This paper studies families’ preferences for peers in the school and the implications of those preferences for the distribution of academic outcomes. I develop an equilibrium model of school competition and student sorting under social interactions. In the model, families differ by human capital and income. Academic achievement depends on own characteristics, school productivity, and the characteristics of the peers. Geographic differentiation gives schools local market power to increase prices and decrease quality in the absence of close substitutes. On top of that, social interactions generate interdependencies in demand that add a new dimension for school differentiation. This modifies school incentives through two channels: increased differentiation strengthens market power for some schools (direct channel) and incentivizes a screening strategy that exploits heterogeneous responses to prices and quality to intensify that differentiation (strategic channel). To study the empirical importance of these mechanisms, I estimate the model using administrative microdata from Peru. I address endogeneity of prices, quality, and peers by combining a regression discontinuity in the assignment of a scholarship with instruments that exploit the timing and local variation of a generous teacher payment reform and shocks to student sorting generated by a teachers’ strike. I find that social interactions have sizable effects, increasing the income gap in academic achievement by 30 percentage points. I use the predictions of the model to analyze the effects of counterfactual education policies in equilibrium. I then decompose the mechanisms to provide guidance on how to design education policies that improve the distribution of outcomes.