The study tested the hypothesis that there are sex differences in the pathways to mathematical development. Three hundred forty-two adolescents (169 boys) were assessed in various mathematics areas from arithmetic fluency to algebra across 6 th to 9 th grade, inclusive, and completed a battery of working memory, spatial, and intelligence measures in middle school. Their middle school and 9 th grade teachers reported on their in-class attentive behavior. There were no sex differences in overall mathematics performance, but boys had advantages on all spatial measures ( d s = .29 to .58) and girls were more attentive in classroom settings ( d s = -.28 to -.37). A series of structural equation models indicated that 6 th - to 9 th -grade mathematical competence was influenced by a combination of general cognitive ability, spatial abilities, and in-class attention. General cognitive ability was important for both sexes but the spatial pathway to mathematical competence was relatively more important for boys and the in-class attention pathway for girls.