Rosyth is a town on the Firth of Forth, three miles (4.8 km) south of the centre of Dunfermline. According to the census of 2011, the town has a population of 13,440.