The gender gap has been a widely discussed topic, both in the economic literature and by public opinion. For Chile, although the number of women enrolled in the first year of higher education has exceeded the number of men enrolled since 2009, the average monthly income for salaried women is 20% less than for salaried men. One factor that explains part of the gender gap in wages is occupational segregation. In particular, Chile suffers from an underrepresentation of women in Science, Technology, Engineering, and Math (STEM) college majors, which are associated to higher wages. In this paper, we study how single-sex schools affect the choice of a STEM major. Using an instrumental variable approach, where we use the variation in the supply of single-sex schools as an instrument for the type of school, we find that single sex schools result in higher test scores for both girls and boys (0.8 and 1 standard deviation respectively), and a higher probability of choosing a STEM major for girls, of approximately 4 percentage points.