Multilevel modelling was carried out on national value-added data to study the effects of single-sex education on the progress of pupils from 2002 Key Stage 3 to 2004 GCSE. The analysis suggests that pupils in a selective environment achieve higher progress in single-sex schools; however, the advantage of single-sex schooling seems to decrease with increasing pupils' prior attainment (for girls) or with increasing school 'selectiveness' (for boys). These phenomena might be a result of a ceiling effect, as pupils with high prior attainment at Key Stage 3 cannot improve as much as pupils with lower initial attainment. There was also strong evidence suggesting that pupils achieve higher progress in the independent sector compared to grammar education. On the other hand, in a nonselective environment only pupils with lower prior attainment and those attending schools with a full range of abilities seem to benefit from single-sex education.