Tranent is a town in East Lothian (formerly Haddingtonshire), in the south-east of Scotland. It lies beside the A1 road,the A1 runs through the parish splitting the parish from its associated villages and hamlets namely Meadowmill and the port of the parish Cockenzie.The original main post road ran straight through the town until the new A1 was built.10 miles (16 km) east of Edinburgh. It is one of the oldest towns in East Lothian, and built on a gentle slope, about 90 metres (300 ft) above sea level. The population of the town is approximately 12,140, an increase of over 4,000 since 2001, making it the second most populated town in East Lothian after Musselburgh. Tranent was formerly a major mining town, but now serves as a commuter town for Edinburgh.