Cupar is a town and former royal burgh in Fife, Scotland. The town is situated between Dundee and the new town of Glenrothes.
According to a recent population estimate (2006), Cupar had a population around 8,980 making the town the ninth largest settlement in Fife.
The town is believed to have grown around the site of Cupar Castle, which was the seat of the sheriff and was owned by the earls of Fife. The area became a centre for judiciary as the county of Fife and as a market town catering for both cattle and sheep.
Towards the latter stages of the 13th century, the burgh became of great importance staging the site of an assembly of the three estates - clergy, nobility and burgesses - organised by Alexander III in 1276 as a predecessor of the Parliament of Scotland.
Although, written information of a charter for the modern town was lost, evidence has suggested that this did exist as one of the many properties owned by the Earls of Fife by 1294.
During the middle of the 14th century, the burgh started to pay customs on taxable incomes, which probably meant that royal burgh status was gifted sometime between 1294 and 1328. The oldest document, referring to the royal burgh, was a grant by Robert II in 1381 to give a port at Guardbridge on the River Eden for the residents of the burgh to help boost trade with Flanders. This grant was officially recognised by James II in 1428.