And contrary to common wisdom that girls start to “dumb down” in middle school, their advantage in math and science actually starts to really show up at that age, Daniel Voyer and Susan Voyer of the University of New Brunswick in Canada found.

They did what’s called a meta-analysis, combining data from many different published studies. They ended up with details on more than a million boys and girls in more than 300 studies done across the world, including the U.S., Canada, Europe, the Middle East and Asia.

The pattern has held true since 1914 — girls get better grades than boys in all subjects. They excluded one-time tests like the Scholastic Aptitude Test (SAT).

From elementary school through graduate school, females have a distinct advantage in grades, they found. The differences are the biggest in language and the smallest in math, but even in math girls and young women get better grades on average, the analysis found.

“This contrast in findings makes it clear that the generalized nature of the female advantage in school marks contradicts the popular stereotypes that females excel in language whereas males excel in math and science,” the researchers wrote.

It’s not clear why. It could be that girls are more likely to try to truly master the material, while boys focus on the big score of doing well on final exams or aptitude tests, the researchers said. It’s also possible that parents expect girls to do poorly and encourage them more. There’s also the popular theory that girls find it easier than boys to sit still and concentrate in class, or at least to behave in a way that pleases teachers.

"The fact that females generally perform better than their male counterparts throughout what is essentially mandatory schooling in most countries seems to be a well-kept secret, considering how little attention it has received as a global phenomenon," Susan Voyer concluded.