We tested the relationship between gender-stereotypical beliefs (GSBs) of female and male classroom peers and female achievement in mathematics. Complete-class student survey data merged with family register data from 1,047 Danish 6th-grade students, nested in 50 classrooms within 28 schools, were analysed using multilevel linear regressions including controls for parental education and income, the percentage of females in the classroom, prior math test scores, and the parental education, income, and prior test scores of female and male peers. We found that the GSBs of female peers were negatively associated with girls’ math achievement. Similar variables were not related to the math achievement of boys.