Americans rarely marry outside of their race or class group. We distinguish between two possible explanations: a lack of exposure to other groups versus a preference to marry within group. We develop an instrument for neighborhood exposure to opposite-sex members of other race and class groups using variation in sex ratios among nearby birth cohorts in childhood neighborhoods. We then test whether increased exposure results in more interracial (white-Black) and interclass (top-to-bottom parent income quartile) marriages. Increased exposure to opposite-sex members of other class groups generates a substantial increase in interclass marriage, but increased exposure to other race groups has no detectable effect on interracial marriage. We use these results to estimate a spatial model of the marriage market and quantify the impact of reducing residential segregation in general equilibrium. For small changes in exposure, the model implies effects in line with recent estimates from policy experiments. We then use the model to assess the overall contribution of segregation and find that residential segregation has large effects on interclass, but not interracial, marriage.