This paper uses a structural, two-sided model of the education system to study the interactions between parents’ school choices and teachers’ labour supply decisions in the context of secondary education in England. I find that more affluent households put more weight on school performance when applying for school places, and teachers tend to prefer working for schools with children from more affluent families. These preferences generate sorting effects where children from more disadvantaged households tend to be taught by less experienced and less effective teachers, which increases inequality in learning outcomes. The simulation of policy counterfactuals sows that funding for schools serving disadvantaged communities would have to increase very substantially to counter these sorting effects and reduce inequality.