ScotRail operates a train from Dunfermline to Inverkeithing hourly. Tickets cost $3 - $4 and the journey takes 7 min. Alternatively, Stagecoach UK operates a bus from Dunfermline to Inverkeithing every 20 minutes. Tickets cost $2 - $4 and the journey takes 26 min. Bay Travel also services this route hourly.
From Dunfermline Town train to Inverkeithing. 7 min £2. From Dunfermline, Bus Station bus to Inverkeithing, Square (Spar Supermarket). 26 min £2. From Dunfermline taxi to Inverkeithing. 8 min £16. From Dunfermline Uber to Inverkeithing. 8 min £12. From Dunfermline walk to Inverkeithing. 1 h 24 min.