This study investigates the impact of gender socialization on early mathematics gender gaps, focusing on children's gendered activities and parental roles. Analyzing data from over 4,000 children (50% girls), we observe that less traditionally organized households correlate with higher preschool academic achievement, irrespective of income or parental education. However, by 1st-grade (Mage=6.6), boys' math performance becomes independent of family organization, widening gender gaps favoring boys in traditionally structured families. These findings suggest that family environment contributes to math gender differences. However, traditional family organizations do not necessarily lead to gender-stereotypical activities in children. Furthermore, sex differences in 1st-grade math scores were not mediated by differences in gendered activities.