Skills shortage in the fields of Sciences, Technology, Engineering, and Mathematics (STEM) poses a significant challenge for industries globally. This study examines the interrelationship between high school students’ gender, their proficiency in Information and Communication Technology (ICT), and their career preferences in the STEM domain. Based on representative data for German teenagers, our study shows that female adolescents are less likely to choose a career in STEM unless they have strong ICT skills in secondary school. The relationship does not hold for male students. Our findings can be explained with evidence that teenagers sort into occupations they believe to be good at and that female teenagers rather underestimate their true potential. Using different empirical approaches, we also show that ICT skills act as a moderator and not as a mediator in the gender-specific choice of training upon graduating from secondary school.