In Australia, many students, especially girls, choose not to study advanced mathematics in Year 12 even though their schools offer relevant subjects. Previous studies have rarely examined, using nationally representative samples of Australian students, the extent to which teenage educational experiences and occupational expectations influence gender differences in later pursuits of advanced mathematics subjects. To fill this gap, I use multilevel logistic regression models to analyse the data from the 2003 cohort of the Longitudinal Survey of Australian Youth. My results show that students’ mathematics achievement, occupational expectations and self-assessed mathematical competence are crucial in explaining why boys are considerably more likely than girls to enrol in advanced mathematics subjects. The gender gap would decrease greatly if girls were as likely as boys to perform well in mathematics, to aspire to mathematically intensive careers and to have more confidence in their mathematical abilities when they were 15 years old.