Abstract Gender differences in mathematics achievement have important implications for the underrepresentation of women in science. Typically, gender differences in mathematics achievement are thought to emerge at the end of middle school and beginning of high school, yet some studies find differences among younger children. This paper utilizes data from the Early Childhood Longitudinal Study, Kindergarten Class of 1998–99 to analyze differences in a nationally representative sample of kindergartners as they progress from kindergarten to fifth grade. Using quantile regression models to examine gender differences across the distribution, differences are found among students as early as kindergarten. Initially boys are found to do better at the top of the distribution and worse at the bottom, but by third grade boys do as well or better than girls throughout the distribution. The male advantage at the top of the distribution among entering kindergartners is largest among families with high parental education, suggesting that gender dynamics in middle and upper class families have important implications for continuing gender segregation in science occupations. Gender differences for entering kindergartners also vary across race, with Asians exhibiting the largest male advantage at the top of the distribution. In contrast to the overall pattern, among Latino kindergartners girls have an advantage over boys at the top of the distribution.