Kirkcaldy (; Scots: Kirkcaldy; Scottish Gaelic: Cair Chaladain) is a town and former royal burgh in Fife, on the east coast of Scotland. It is about 11.6 miles (19 km) north of Edinburgh and 27.6 miles (44 km) south-southwest of Dundee. The town had a recorded population of 49,460 in 2011, making it Fife’s second-largest settlement and the 12th most populous settlement in Scotland.
Kirkcaldy has long been nicknamed the Lang Toun (listen (help·info); Scots for “long town”) in reference to the early town’s 0.9-mile (1.4 km) main street, as indicated on maps from the 16th and 17th centuries. The street would finally reach a length of nearly 4 miles (6.4 km), connecting the burgh to the neighbouring settlements of Linktown, Pathhead, Sinclairtown and Gallatown, which became part of the town in 1876. The formerly separate burgh of Dysart was also later absorbed into Kirkcaldy in 1930 under an act of Parliament.
The area around Kirkcaldy has been inhabited since the Bronze Age. The first document to refer to the town is from 1075, when Malcolm III granted the settlement to the church of Dunfermline. David I later gave the burgh to Dunfermline Abbey, which had succeeded the church: a status which was officially recognised by Robert I in 1327. The town only gained its independence from Abbey rule when it was created a royal burgh by Charles I in 1644.