The gender gap starts in ninth grade

Girls comprise just 30% of the top 5,000 ninth graders in the American Mathematics Competitions, just 18% of the top 500 ninth graders, and only 8% of the top 50, according to new research distributed by the National Bureau of Economic Research on Monday. The gender gap in math achievement worsens over time. By the time these girls get to their senior year of high school, they comprise only 22% of the top 5,000 students, and just 12% of the top 500.

See: All Americans should know these financial lessons before leaving high school

The researchers, from Massachusetts Institute of Technology and The University of Pennsylvania, found that girls are more likely to drop out of participating in the American Mathematics Competitions, especially by senior year, and those who remain in the competition have lower performance scores on average.

Girls are less likely to move up the ranks in ninth-grade math class, which both causes them to be disappointed and discouraged from participating in future competitions. Sometimes, even high-achieving female students may also rationalize math is not one of their strong skills and invest their time into other subjects that seem more promising, the researchers noted. They looked at data from the American Mathematics Competitions between 1999 and 2007, which includes 25-question multiple choice tests administered to more than 200,000 students in about 3,000 U.S. high schools.

And yet studies show that middle-school aged girls are actually very good at STEM-related subjects, which are science, technology, engineering and math, a 2016 National Assessment of Educational Progress study showed.

Why the gender gap in math?

So why do young girls fall behind in math? Experts point to a doubled-edged sword: a bias against both young girls studying math and young women working in STEM-related fields.

Teachers may give girls less attention and, consciously or not, make them feel unwelcome in the class. One 2012 study published in the journal Gender & Society found “consistent bias against white females” among teachers who believed math was just easier for boys than girls. It concluded that “disparities in teachers’ perceptions of ability that favored white males over minority students of both genders are explained away by student achievement in the form of test scores and grades.”

As a result, that gender gap can even worsen in college. Less than a third of bachelor’s degrees in science and engineering were awarded to women in 2014, compared to 40% of men, according to the National Student Clearinghouse, and some tech-centric companies have blamed colleges for graduating too few women with necessary credentials.

Experts say women working in STEM face unfriendly and, sometimes, hostile work environments. In STEM jobs, “discrimination and sexual harassment are seen as more frequent, and gender is perceived as more of an impediment than an advantage to career success,” according to survey published by the Pew Research Center in January. Women working in STEM jobs are more likely to say they have experienced discrimination in the workplace (50% versus 41% in other fields), the survey found.

How does this affect women’s careers?

A decline in girls’ interest and achievement in math can be detrimental after high school. Some of the most demanding jobs are in math, science and technology. A lot of high-paying jobs require a combination of math and social skills, including financial managers, engineers and registered nurses or physicians.

Women are often stereotyped as shying away from these math-intensive careers. Last year the Certified Financial Planner Board posted an image on Instagram FB, -0.75% of a quote saying math wasn’t so hard. The purpose of the post was to encourage women to join the field, though it received backlash from men and women financial advisers.

This 2017 study concluded that science, technology, engineering, and math (STEM) careers were among the highest paid. An entry-level engineer in the U.S., for instance, can expect to make $59,213 per year or 19% above the U.S. national average.

Also see: The career-ready high-school graduate exists only in your imagination

Still, a fear of math is not uncommon, and is known as “math anxiety.” Girls tend to be more anxious about math than boys, even if they’re higher achievers, according to research from the University of Missouri, the University of California at Irvine and the University of Glasgow, which looked at boys and girls around the world.

Alexandra Samuel, a technology researcher and author of “Work Smarter with Social Media,” wrote in The Wall Street Journal last year she too was afraid of math in high school and now works in a career constantly surrounded by numbers. “I recognized that in this era of abundant data, math phobia is a recipe for missing out on the professional insights and opportunities that make the difference between a business that scrapes by, and a business that is wildly successful,” she said.

She suggests overcoming the fear of math by finding questions that must be answered with numbers, finding a passion project that involves crunching numbers with “meaningful context” and looking for a mentor. Samuel suggested that boys may receive more support than girls to study math. “We can’t talk about the impact of math phobia in business without acknowledging that girl students are subject to this more than boys—which has an effect later in life,” she added.

Get a daily roundup of the top reads in personal finance delivered to your inbox. Subscribe to MarketWatch’s free Personal Finance Daily newsletter. Sign up here.