Despite global advancements in educational access, women remain underrepresented in STEM fields worldwide, including in Japan. This study explores the factors contributing to gender inequality in STEM choices among Japanese students, focusing on the relative importance of two mechanisms: the academic pipeline and the dream pipeline. By utilizing longitudinal data from Japanese students from elementary through high school, this paper finds that academic self-concepts and preferences play a more significant role in explaining gender inequality in Japan than do occupational plans, which are emphasized as important factors, especially in the United States. Specifically, academic preferences account for 33%, academic self-concept accounts for 20%, and occupational plans account for only 9% of the gender gap in STEM choices. This paper also reveals that gender disparities are already present at the start of elementary school and remain stable throughout school education. Females consistently show greater academic self-concepts and preferences in language, whereas males prefer mathematics and science and aspire to STEM-related professions. These findings from a non-Western context suggest that the mechanism behind gender disparities in STEM choices is embedded in the social context and highlight the need to examine the early childhood factors that contribute to the formation of gender disparities. Further research should include cases from other countries to obtain a more comprehensive understanding.