People whose jobs are in Scotland's two largest cities could save thousands of pounds if they commuted from elsewhere, according to new research.
Figures from the Bank of Scotland show that residents from Dunblane, Glasgow and Motherwell who take a 60 minute train to work in Edinburgh spend around £2700 a year on fares, but benefit from house prices which are, on average, £75,000 less than if they lived in the capital.
Average house prices in places 30 minutes away from Edinburgh on the train, such as Dunbar, Falkirk and Livingston, are about 34% (almost £67,500) lower than in the city centre.
This compares with the average £1500 annual cost of a half-hour rail commute to the capital.
Buyers can also get more property for their money outside Edinburgh due to lower prices per square metre outside the city, the bank said.
Commuters who live in places which are about a 30 minute rail journey from Glasgow, including Linlithgow, Stirling, Greenock and Motherwell, pay an average of £6000 (5%) less for their homes than if they lived in the city.
The average cost of an annual rail pass from these areas is £1600.
However, the bank said the difference in property prices may be outweighed by travel costs if people commute for a number of years.
Those commuting from towns and cities approximately an hour away from Glasgow, such as Edinburgh, Ayr and Perth, have an average house price (£185,000) that is £58,000 (46%) higher than in Glasgow.
Coupled with the price of an annual rail pass costing close to £3200, many of these commuters may be financially better off living closer to their place of work, according to the research.
It is also the case in Aberdeen, where commuters often pay more for a house than they would to live in the city.
With an average house price in Aberdeen close to £172,000, commuters with a rail journey of about 15 minutes from Stonehaven pay, on average, a third (£49,000) more for their homes, combined with the annual rail cost of £1150.
In Inverurie and Montrose, which are both about 30 minutes from Aberdeen, houses are an average of 15% higher than in the city, and rail passes cost between £1300 and £2700 a year.
Nitesh Patel, housing economist at Bank of Scotland, said: "Distance from work is often the deciding factor for purchasing a home.
"It is generally true that the further you commute, the larger are the financial savings made in terms of lower house prices.
"This is the case with towns surrounding Edinburgh and Glasgow, but not Aberdeen.
"A major consideration for commuting to leading cities, such as these, is that the typically higher income that can be earned tends to go much further in surrounding towns."