The Scottish Government says P1s and composite classes should be no bigger than 25 pupils, P2 and P3s no larger than 30 and P4s to P7s no greater than 33.
But classes can breach the maximum size if there are children in special education who receive part of their schooling in a mainstream school. There should still be a maximum of 30 pupils per teacher.
In Edinburgh City, there are five schools which have classes over maximum capacity.
This article lists all the primary schools which have the largest class sizes in Edinburgh City.
1. Blackhall Primary School (1)
Primary 1 in Blackhall Primary School has 27 pupils - two more than the maximum allocation of 25 Photo: Google
2. Brunstane Primary School
Primary 2 in Brunstane Primary School has 31 pupils – one more than the maximum allocation of 30 Photo: Google
3. St Catherine's R C Primary School
Primary 1 in St Catherine's Roman Catholic Primary School has 26 pupils – one more than the maximum allocation of 25. Pictured is HRH the Duchess of Cambridge on her visit to St Catherine's in 2016. Photo: Neil Hanna
4. Blackhall Primary (2)
Another Primary 1 class in Blackhall Primary School has 26 pupils - one more than the maximum of 25 Photo: Google