In an advanced placement calculus course, there are as many girls as there are boys.
"They are taking the same number of courses and the same level of courses as men are, so that gives them equal preparation," said UC Berkeley researcher Marcia Linn.
Researchers analyzed math scores from seven million students in 10 states. These were standardized tests as part of the federal No Child Left Behind Act.
Linn is the co-author of the study which found girls measured up to boys in math in every grade first through 12th.
"It was a different story 20 years ago. Studies showed that when it came to math, in elementary school, girls and boys were at the same level. But in middle school, girls began to fall behind, it got worse in high school.
What has changed for girls is that they are taking programs that have been traditionally offered to boys.
"Since then course taking is also equalized which is very exciting which means advance courses in mathematics are taken by the same number of men and women," said Linn.
"Girls seem to be more focused when it comes to the projects, the work, the critical thinking I would say in general that has been my experience. So I disagree then with the president of Harvard University, and I would disagree with him now," said math teacher Noel Corea.
Three years ago, then Harvard University President Lawrence Summers pointed to research showing girls are less likely to score top marks than boys in standardized math and science tests.
Today, Harvard has a woman president.
The study did find girls are still behind in science in technology.
"People have shown the benefit of having diversity in these careers and there is an opportunity now to focus more on that," said Linn.