Abstract: We study the effects of exposure to older/younger classroom peers resulting from the widespread use of multi-grade classes for pupils at Scottish primary schools. For identification, we exploit that school class planning algorithms, which are based on school enrolment counts and embed maximum class-size rules, quasi-randomly put some pupils into multi-grade classes. We find that school starters strongly benefit from exposure to older peers in measures of both numeracy and literacy. These benefits are not driven by smaller class size or more parental input. We also show that gains for younger pupils may come at the expense of their peers from preceding cohorts who show lower attainment in numeracy. We find weaker and less robust evidence for fourth-graders and seventh-graders. Our results hold in both urban and rural settings, girls and boys benefit alike, and there are no differences across socio-economic backgrounds.