The average train between Ayr and Dunfermline takes 2h 59m and the fastest train takes 2h 12m. There is a train service every few hours from Ayr to Dunfermline. The journey time may be longer on weekends and holidays; use the search form on this page to search for a specific travel date.
Trains run hourly between Ayr and Dunfermline. The earliest departure is at 5:15 AM in the morning, and the last departure from Ayr is at 11:05 PM which arrives into Dunfermline at 7:20 AM. All services require a transfer at Glasgow Central and take an average of 2h 59m. The schedules shown below are for the next available departures.


3h 3m • 2 changes


2h 42m • 2 changes


2h 12m • 2 changes


2h 40m • 2 changes


3h 3m • 2 changes


2h 42m • 2 changes


2h 12m • 2 changes


2h 40m • 2 changes


3h 3m • 2 changes


2h 42m • 2 changes


2h 12m • 2 changes


2h 40m • 2 changes
Want to know about travelling from Ayr to Dunfermline? We have put together a list of the most frequently asked questions from our users such as: What is the cheapest mode of transport? What is the quickest option? How much do tickets usually cost? and many more.
No, there is no direct train from Ayr to Dunfermline. However, there are services departing from Ayr station and arriving at Dunfermline station via Glasgow Central. The journey, including transfers, takes approximately 2h 59m.
Ayr to Dunfermline train services, operated by ScotRail, depart from Ayr station.
Ayr to Dunfermline train services, operated by ScotRail, arrive at Dunfermline Town station.
Book your Ayr to Dunfermline train tickets online with ScotRail.
The distance between Ayr and Dunfermline is 99.9 km. The road distance is 164 km.
You can take a train from Ayr to Dunfermline Town via Glasgow Central, Glasgow Queen Street, and Haymarket in around 3h 4m.