This paper uses social network and spatial data from the National Longitudinal Study of Adolescent Health (Add Health) and data on school district segregation from the National Center for Educational Statistics (NCES) to estimate the effect of racial residential segregation on school friendship segregation in the U.S. Within school residential segregation is measured by the spatial distance between potential friends in the Add Health data, and levels of across-school segregation are calculated from the NCES data. The use of hierarchical linear models (HLM) allows us to simultaneously estimate the effect of race, within-school spatial segregation, and school-level racial heterogeneity on friendship choice using the Add Health data. We use these results to predict the decline in friendship segregation that would occur if across- and within-school residential segregation were eliminated in U.S. metropolitan areas using the NCES data. The results suggest that about a third of the level of racial friendship segregation in schools is attributable to residential segregation. Importantly, however, we find that almost all of this effect is due to geographic segregation across schools rather than spatial segregation within schools