I present a method to jointly estimate social spillovers in the classroom and the distributions of teacher and student effects. This method is based on the covariance and higher‐order moments restrictions of the test scores, requiring the random assignment of teachers and students to classrooms. Using the Tennessee Project STAR dataset, I estimate sizeable spillovers in kindergarten classrooms and departures from normality of the teacher and student ability distributions. The estimates also show that reducing class size has a positive effect on mean performance, but it increases the inequality. Based on these estimates, I perform several input‐neutral policy counterfactuals involving teachers and students assignment rules, and changing the distribution of class sizes. For the latter, I derive an optimal class size distribution rule, which increases mean test scores and reduces the overall variance.