It’s become a fact of American life that girls are better than boys at school. They get better grades. They’re suspended less. For every generation since the boomers, women have been more likely than men to earn high school and college diplomas.

In fact, girls are pretty much the only reason the high school graduation rate went up in past 40 years, according to calculations by Harvard economist Richard Murnane. The male high school graduation rate has been stuck at 81 percent since the 1970s, while the female graduation rose from 81 percent to 87 percent.

Women have been so persistently superior it is perhaps time for a new stereotype about the sexes — girls as bookish mavens like Lisa Simpson; boys as goof-offs like Bart.

There are many theories for this widening academic achievement gap, but first, here’s another observation that might shed some light: The differences between boys and girls are largest among the most disadvantaged children. Socioeconomic status does not entirely explain the gender gap. Even well-off boys struggle to compare to well-off girls. But a tough upbringing sets boys back much farther.

There’s something about growing up with a single mother, growing up in poor neighborhoods and attending low-quality schools that hurts boys much more than it hurts girls.

“It’s well known that young women have surpassed young men in schooling,” says MIT economist David Autor, “but what struck us was that these gaps vary so much across race and socioeconomic status.”

Recently, Autor and his colleagues analyzed the records of over a million Florida children born between 1992 and 2002 who attended in-state public schools. They wanted to figure out what was ailing America’s boys, and why girls seemed so resilient.

It’s been well-documented, for instance, that boys have more behavioral problems in class — so are disciplinarian schools to blame? Crime and gang activity tend to sweep up boys more often than girls — so are bad neighborhoods to blame? Many of the poorest boys and girls grow up in single-mother households — so are absent fathers to blame?

To untangle these contributing factors, Autor and his colleagues — David Figlio and Krzysztof Karbownik of Northwestern, Jeffrey Roth of the University of Florida and Melanie Wasserman of MIT — pieced together birth and school records, combining them with information about neighborhoods and school quality.

They found that boys start to fall behind girls at an early age. They are less likely to be kindergarten-ready according to a state checklist of skills — less likely to identify letters of the alphabet, less likely to be able to communicate their needs. The differences are most dramatic among children who are black and those from disadvantaged households.

The researchers didn’t have data on family income directly, but they knew the mother’s education level, her marital status, as well as whether the father claimed his child on the birth certificate. These factors are important predictors of the quality and richness of a child’s home life. They also knew which children were siblings, so they could use brothers and sisters to control for the quality of the home environment.

On average, about 83 percent of Florida students were kindergarten ready. Among the children with the best household circumstances, there was a gender gap of about 2 percentage points. Among children with the worst household circumstances, the gap was much larger. Boys in broken families were 8 percentage points less likely than girls to be kindergarten ready.

When family characteristics and neighborhood income were controlled for, white boys in Florida were 5.5 percentage points less likely than white girls to be kindergarten ready. The gap between black boys and girls was significantly wider, at 8.4 percentage points. Why were black boys so much worse off? The researchers calculate that about half of these racial differences are explained by the fact that boys are more sensitive to family disadvantages than girls.

As the kids grew up, boys continued to lag behind girls — and the gender gap was consistently bigger among the worst off. The pattern shows up in the rate of absences and suspensions, in standardized test scores, in criminal records, all the way through high school graduation. In a recent draft of their paper, the economists provide charts of the boy-girl gap in some of these measures.

For instance, chart B shows that among children born to high-school dropouts, boys are 10 percent less likely than girls to graduate high school on time. The gender gap is half that among children born to college graduates. Or look at test scores in chart C. Among children born to married parents, boys outscore girls. Among children born to fathers who didn't claim them on their birth certificates, girls beat the boys.

Together, these charts tell a story: When boys and girls face adverse circumstances, boys suffer more. An important question is how much of this is caused by factors outside the home. Families with low socioeconomic status tend to be headed by single mothers, and they tend to live in rougher neighborhoods with lower quality schools.

Harvard economists Raj Chetty, Nathaniel Hendren and Larry Katz have shown that giving poor families vouchers to move into better neighborhoods has big effects on their young children, who grow up to earn 30 percent more than the peers they left behind. Based on the observation that some neighborhoods give children a much better shot at moving up the income ladder, Chetty and Hendren have developed measures of how different places have different levels of economic opportunity.

But when Autor and his colleagues plugged in the data on neighborhood and school quality (Florida grades its schools A-F), they found that these factors didn’t help much in explaining why poor boys are worse off than poor girls. Only about 20 percent of the effect of socioeconomic status on the gender gap could be blamed on bad schools and bad neighborhoods (school quality being relatively more important). In other words: Bad schools and bad neighborhoods harm boys somewhat more than girls. But these are not the main culprits for the gender gap.

Instead, the problem for boys — and the biggest reason they fall behind their female peers and sisters — is their family situation: the family’s income, the mother’s education, the presence or absence of a father, and so forth.

Why are broken homes so much worse for boys than girls? It may be that boys naturally need more nurturing.

“There’s a lot of studies that show boys have trouble with what we call soft skills,” Autor said. “They're more impulsive, they have more trouble containing themselves. It takes a lot of work help boys overcome those behavioral traits. Where do they learn that? It starts with families, with parents role-modeling good behaviors.”

Because of their tendency to act out, boys may be in particular need of parental guidance — but because poor families also tend to be single-parent families, mom or dad time is a scarce resource. A 2015 study from economists Marianne Bertrand and Jessica Pan showed that boys are particularly at risk when they grow up in single-mother households. When boys don’t get enough parental attention, they misbehave. Girls, in contrast, are less likely to misbehave regardless of how much time parents spend with them.

The phenomenon of female advantage in school is not unique to the United States. In other wealthy countries there is also a gender gap between high school graduation rates. The pattern is consistent, as this chart of male and female graduation rates from the OECD shows. From Korea to Sweden, girls are slightly more likely to finish high school than boys. 

The latest research from Autor and his colleagues shows that early-life adversity causes boys to struggle much more than girls. It's not yet clear why girls are so tough, but they seem much better suited to the challenges of modern childhood. The gender differences are minimal in households with resources — but among poorer families, boys systematically fall short of their sisters and female peers. This pattern implies that if income inequality continues to worsen, the gender inequalities will worsen, too.