Dunfermline is a city, parish, and former royal burgh in Fife, Scotland, on high ground 3 mi from the northern shore of the Firth of Forth. The city currently has an estimated population of 58,508. According to the National Records of Scotland, the greater Dunfermline area has a population of 76,210.