Research by the Bank of Scotland found the average price has grown from £130,784 in 2013 to £172,423 in 2018, an increase of 32%.
Over the same time, flats have seen average prices rise by £26,995 (26%) while detached homes recorded an increase of £43,131 (9%).
The study found flats remain the most popular property type among Scottish first-time buyers, making up over 40% of first-time sales.
The popularity differs with the rest of the UK where terraced homes are the most popular purchases among first-time buyers (37%), with semi-detached homes being the second most popular choice (29%).
Flats are the third most popular property type at 22% across Britain.
The average price of a flat in Scotland stands at £132,386.
Graham Blair, mortgage director at Bank of Scotland, said: "Despite the price rising by over a quarter in the last five years, flats remain the most popular choice among Scotland's first-time buyers, which is different compared to the rest of the UK.
"Those who already own homes will be eyeing their next move with nearly a third of homemovers looking to step up to a detached home."