A study by Reform Scotland found high house prices in the catchment areas for the best-performing state schools meant moving there could be more expensive than private school fees for two youngsters.
The think tank said that of the top 10 performing schools, with the highest proportion of pupils getting three or more Highers, eight of these had house prices at least 34% higher than the local average in their catchment area.
It added for the 10 worst-performing schools, eight had property prices below the local average in their catchment area, while in six house prices were at least 20% lower.
Reform Scotland said it "became apparent that, especially in more urban areas, it cost parents less to send two children to a private secondary school and live in a less expensive area of the local authority, than to buy a house in the catchment area of one of the best-performing schools in the area".
The study was based on a part of Edinburgh, a city where around one in four children attends a private school for their secondary education, in comparison with a Scotland-wide figure of about one in 20.
While the average price paid for a house in the capital over the last three years was said to be £225,931, this rose to £327,313 in the postcode area of Boroughmuir High School - where 64% of fourth-year pupils passed at least five standard grades last year, compared to 38% across Scotland.
With properties in this area £101,382 more expensive than the average in the capital, it could cost house buyers £127,000 to borrow this extra amount.
Reform Scotland said it would cost about £123,000 to send two children to a private school - such as George Heriot's or George Watson's in Edinburgh - for six years of secondary education.
The think-tank concluded: "We believe that this indicates that to access the best-performing schools in Scotland, parents are paying for the privilege - either directly through school fees, or indirectly through higher housing costs.
"The high house prices around the most academically successful schools can mean it is cheaper to live in a less expensive area and send your children to a private school, than it is to live in the catchment area of one of the best academically performing schools."
Keir Bloomer, who has been involved in curriculum reforms said the research showed that "Scottish education remains highly inequitable".
Mr Bloomer is a Reform Scotland advisory board member and chaired the Commission on School Reform, set up by Reform Scotland and think-tank the Centre for Scottish Public Policy.
He said: "This is not about 'good schools' and 'bad schools', but about our failure to tackle disadvantage effectively."
In a report looking at the future of Scottish education the commission argued fundamental changes were needed to empower schools and better serve pupils from disadvantaged backgrounds.
It recommended a shift in the role of local authorities, saying in many cases they were too involved with the day-to-day management of schools.
The commission argued such a shift could give headteachers control over areas including leverage to recruit talented teachers to work in deprived areas by offering financial incentives.