For decades, the education world has been locked in a bitter, soul-searching debate about whether separating students by ability is educational apartheid or just common sense. A new study from University College London's Institute of Education has waded in with a definitive answer: it's fine, actually.

The research, backed by the Education Endowment Foundation (EEF), found that secondary school pupils in England with strong maths skills made slower progress in mixed-attainment classes than when grouped with similarly brainy peers. Crucially, setting by ability did not “significantly harm the attainment of low-prior-attaining or socioeconomically disadvantaged” pupils. So the kids at the back of the bus aren't being left further behind - they're just staying put.

The study also flipped a long-held belief on its head: previous reports claimed setting harms the confidence of those outside the top sets, but the impact analysis showed negative effects on self-confidence in maths for pupils in mixed-attainment schools. Apparently, struggling next to a future Fields Medal winner is worse for your self-esteem than struggling in a room full of fellow strugglers.

John Jerrim, a professor of education and social statistics at UCL who wasn't involved in the research, called the outcome “big and important.” He suggested the EEF should “probably now come out and support achievement grouping in maths,” arguing it has “no negative impact on lower-achievers, some positive benefits for high-achievers, and helps teachers manage workload.” He also took a subtle dig at academics who once called ability grouping “symbolic violence,” saying the work shows “the need for more restraint from academics.”

The study looked at maths attainment and self-confidence for Year 7 and 8 pupils (ages 11 to 13) in 28 schools with mixed-ability classes and 69 similar schools that used setting. Among high-achieving students, those in mixed-ability classes made two months' less progress on average. Overall, schools with mixed classes made one month's less progress.

Researchers noted that “despite well-intentioned policies in mixed-attainment schools around equity and challenge for high-attainers, only setting schools appear to be challenging high-prior-attaining students.” In other words, the gap between best and worst performers narrowed in mixed schools, but only because the smart kids got bored, not because the struggling kids caught up.

There was a caveat: for ability setting to work properly, schools must avoid allocating their best teachers exclusively to the top sets. So don't just give the good teachers to the kids who already get it.

Pepe Di'Iasio, general secretary of the Association of School and College Leaders, said school leaders are best placed to make decisions about setting, but noted the “longstanding problem with recruiting maths teachers” means many schools have to rely on nonspecialists. Because nothing says “we value education” like having a history teacher explain quadratic equations.