Across an array of educational outcomes, evidence suggests that girls outperform boys on average. For example, in Chicago, ninth-grade girls earn math GPAs that are 0.29 points higher than boys on average. This paper examines explanations for this gap, such as girl-boy differences in academic preparation, behaviors and habits, and experiences in math classes. After accounting for these factors, the gender gap in math grades persists. We, then, examine the classroom-level conditions that reduce the gender gap in grades. The gap is smaller in more advanced courses like honors classes and geometry. Further, boys perform more similarly to girls in classes with male teachers. These findings highlight classroom conditions that are more conducive to the academic success of boys.