Teenage girls can be a fickle bunch, especially when it comes to their interest in science, technology, engineering and math.
A new survey commissioned by Microsoft (MSFT) found that young girls in Europe become interested in so-called STEM subjects around the age of 11 and then quickly lose interest when they're 15.
"Conformity to social expectations, gender stereotypes, gender roles and lack of role models continue to channel girls' career choices away from STEM fields," said psychology professor Martin Bauer of the London School of Economics, who helped coordinate the survey of 11,500 girls across 12 European countries.
The survey also found that girls' interest in humanities subjects drops around the same age but then rebound sharply. Interest in STEM subjects does not recover.
"This means that governments, teachers and parents only have four or five years to nurture girls' passion before they turn their backs on these areas, potentially for good," Microsoft said.
Microsoft admitted it doesn't have a comprehensive explanation for why 15-year-old girls lose interest in science and math. But it has uncovered some strategies to keep them engaged:
Promote female role models in STEM subjects: It's much easier for girls to imagine a career in STEM subjects if they see successful examples.
Microsoft also found that girls are more likely to pursue a career in this area if they think men and women will be treated equally in the workforce.
"Perceived inequality [in the workplace] is actually putting them off further STEM studies and careers," Microsoft said.
Six in 10 girls admitted they'd feel more confident pursuing a STEM career if they knew men and women were already equally employed in these fields.
Offer hands-on STEM exercises: These experiences, both inside and outside the classroom, can bring the subject to life. About four in 10 girls say they don't get enough practical experiences.
Microsoft said it's also important to show girls how the material can be applied in real-life situations, giving the topics more relevance in their lives.
More mentors: Having teachers who mentor and encourage girls in these subjects can have even more of an impact than parent encouragement.
It also helps if this teacher is female.
Related: Microsoft joins legal fight for transgender rights
Top tech titans have been the target of criticism for years for their male-dominated working environments. High profile accusations of sexism and harassment are not uncommon.
Microsoft's own 2016 global workplace report shows that just 26% of its employees are female and less than 18% of its engineers are women.
The company acknowledged in a report accompanying the survey that its success depends on the diverse skills and experiences of its employees.
"A diverse and inclusive workforce will yield better products and solutions for our customers, and better experiences for our employees," it said. "When we encourage girls to pursue science and technology, we double our potential to solve problems."