BackgroundWe tested the broad generality of a model for predicting 9th–10th grade students’ STEM career expectations by age 30, focusing on hard science, mathematics and engineering professions only, known for driving innovation, research and development. The model’s predictors included motivation to learn mathematics, gender, and math classroom environments (disciplinary climate, teacher support and instructional strategies fostering conceptual understanding).MethodsWe used data from the Programme for International Student Assessment (PISA) 2022. Four countries were selected based on the percentage of students expecting STEM careers, representing high vs. low groups (Qatar and Morocco vs. Czech Republic and Lithuania, respectively). Analysis began with computing correlations between the variables, followed by path analyses for each country to determine both direct and indirect effects of the predictors on students’ STEM career expectations.ResultsWe found that motivation to learn mathematics not only directly predicted STEM career expectations but also mediated the influence of the remaining variables: gender (boys show higher motivation to learn math), and math classroom environments (students in well-disciplined math classes with supportive teachers who employ instructional strategies fostering math reasoning also demonstrate higher motivation to learn math). Remarkably, our model consistently demonstrated robustness across all four countries, despite their significant economic, ethnic, and religious diversity.ConclusionsTheoretically, the model reveals that 9th–10th grade students’ transitory long-term STEM career expectations are shaped by their interest in mathematics, their perceived importance of the subject, confidence in their self-efficacy to succeed in math tasks, perceptions of classroom disciplinary climate, teacher support, and their exposure to instructional strategies aimed at enhancing math reasoning. Practically, it suggests widespread potential for informing interventions aimed at increasing student motivation to pursue STEM careers through improved mathematics education practices.