This paper develops a framework for estimating household preferences for school and neighborhood attributes in the presence of sorting. It embeds a boundary discontinuity design in a heterogeneous residential choice model, addressing the endogeneity of school and neighborhood characteristics. The model is estimated using restricted‐access Census data from a large metropolitan area, yielding a number of new results. First, households are willing to pay less than 1 percent more in house prices—substantially lower than previous estimates—when the average performance of the local school increases by 5 percent. Second, much of the apparent willingness to pay for more educated and wealthier neighbors is explained by the correlation of these sociodemographic measures with unobserved neighborhood quality. Third, neighborhood race is not capitalized directly into housing prices; instead, the negative correlation of neighborhood percent black and housing prices is due entirely to the fact that blacks live in unobservably lower‐quality neighborhoods. Finally, there is considerable heterogeneity in preferences for schools and neighbors, with households preferring to self‐segregate on the basis of both race and education.