cristinairanzo / Getty

In recent years, the common wisdom has been that girls are dominating when it comes to academic achievement. In reading in particular, girls have consistently outperformed boys. Some studies have also found that in a typical U.S. school district, girls have all but caught up in math—a subject in which they had historically underperformed and from which they’d been discouraged thanks to persistent stereotypes about their academic interests. Take away the burden of challenging stereotypes and discriminatory beliefs and practices, the thinking goes, and girls will do just as well as boys in the STEM fields.

But now, a new study by a team of researchers led by the Stanford education professor Sean Reardon finds that girls’ dominance in school isn’t the case across demographics. Yes, the study confirms: Overall, in the average U.S. school district, girls and boys are performing about the same in math. But the study finds that in communities in which most families are affluent and white, and in which adult men far outearn women in income, girls continue to lag behind their male peers in math achievement. In some of these districts, boys on average outperformed girls in math by two-fifths of a grade level.

Described as the most comprehensive analysis of its kind to date, and drawing from roughly 260 million standardized-test scores from close to 10,000 U.S. school districts, the study looked at data from seven school years, starting in the fall of 2008. Overall the analysis found that, while girls maintain their edge in reading regardless of their geographic location, they either tend to significantly outperform or significantly lag behind boys in math.

“We set out saying that some districts are going to have more stereotypical gender achievement gaps—larger math gaps favoring boys, larger reading gaps favoring girls—and others that are maybe less stereotypical,” said Erin Fahle, who co-authored the study and earns her Ph.D. in education policy from Stanford this month. “Instead what we found was that districts tend to advantage boys or advantage girls.”

At the other end of the affluence spectrum, a near-opposite phenomenon is playing out: In poor communities of color, namely those where families are predominantly black or Latino, girls on average outperformed boys in math by one-fifth of a grade level, in addition to significantly outperforming them in reading. The new study lends credence to claims that boys in low-income black or Hispanic districts deserve some of the closest attention as policymakers, educators, and parents strive to eliminate gender disparities. “We focus so much on female children’s opportunities in STEM, which is really important and has a large potential economic consequence,” Fahle said. “But we also have to realize that boys’ opportunities are constrained by gender, too.”

The researchers couldn’t draw definitive conclusions from the data as to what explains these dueling phenomena, but they came up with various hypotheses that they hope future studies will examine. One theory: Wealthy areas where men are typically the main or sole breadwinners may implicitly or even explicitly promote the message that math is for boys. Another factor could be that gender stereotypes are inadvertently bolstered in wealthy families when parents respond to, say, a son’s early interest in robots, or a girl’s early interest in dress-up by paying to send the former to an after-school science club or the latter to a theater class. As an example, Fahle cited a study that analyzed the conversations of a sample of families as they observed a science exhibit at a museum. While parents were equally likely to talk to their sons and daughters about the exhibit, they were three times more likely to explain the science to the boys.

“It may be easier for parents to reinforce stereotypical patterns in affluent places because they have more money to do so,” explained Reardon, the study’s lead author, in a statement. “In less affluent places parents can’t spend the same kind of money and, therefore, may not reinforce those patterns as much.”

As for the findings in the poorer districts, Fahle pointed to research suggesting that the norms of masculinity prevalent in many low-income black and Hispanic communities downplay the importance of academic achievement. “Boys subsequently disengage with school somewhat,” Fahle said, “and that could be a pattern that fits with our data.”

Taken collectively, the findings offer critical insight for any endeavor seeking to chip away at the achievement gaps that continue to dog the country. They show the extent to which gender plays a role in determining a child’s long-term academic success—as well as the extent to which that role varies depending on where and among whom that child grows up.

We want to hear what you think. Submit a letter to the editor or write to letters@theatlantic.com.