The 2024 league table looked at primary schools across Scotland and assessed them on various factors, giving them scores out of 100 on listening and talking, numeracy, reading and writing. Nationwide, a total of 81 schools scored a perfect 400 out of 400.
It also uses neighbourhood deprivation figures which take into account income, jobs, health, education, housing, crime and access to local amenities.
A spokesperson for the Sunday Times said: “We are always careful to clarify that The Times Scotland Primary School League Table is not 'Scotland's schools ranked from best to worst'.
“It presents government data from primary seven, arguably the most important year for pupils preparing for high school, for parents to analyse standards across the 1,250 schools that published reportable results. Our aim is to present data in an easily accessible format that parents can understand.”
Take a look through our photo gallery to discover which 15 primary schools from Edinburgh and the Lothians achieved top marks.