Purpose: This article examines the relationship between teacher unionization and the academic performance of students in districts of varying socioeconomic status (SES). We aim to answer the following research questions: Do union effects vary with the SES of districts? Are these effects more (or less) pronounced in high-SES, mid-SES, or low-SES districts? Research Methods/Approach: We merge two nationally representative data sets from the United States: the School and Staffing Survey and the Stanford Education Data Archive. We measure union strength with the presence of collective bargaining contracts (CB) or meet-and-confer agreements (MC). We employ propensity score matching. Considering CB (MC) as a treatment, we define districts with CB (MC) as the treated units and no agreement districts as the nontreated units. Findings: We find that middle-class districts with CB agreements had higher average test scores, in all grades and both math and English, than did districts with similar propensity scores but no CB agreement in place. Neither low-SES nor high-SES districts exhibited significant effects of CB on math or English scores. The pattern in MC effects is quite similar. MC agreements are correlated with higher scores in both subjects in all grades in middle-class districts. Implications: Our results indicate generally positive effects of teachers' unions on student performance on standardized tests. Moreover, these positive effects are concentrated in middle-class US school districts. A decline in the ability of teachers to organize may therefore have differentially negative effects on the outcomes of students in these districts.