The Trends in Mathematics and Science Study's latest assessment ranked Massachusetts students tied for second in the world behind only Singapore on the science portion.
In math, Massachusetts eighth-graders tied for sixth behind South Korea, Singapore, Taiwan, Hong Kong and Japan.
Massachusetts students made a 14-point gain in mathematics and an 11-point gain in science since the last time the test was administered in 2007.
"I am tremendously proud of our students for once again performing as global leaders in math and science," said Gov. Deval Patrick in a news release. "Our record of leadership in student achievement isn't by accident -- it's because we have chosen to invest deeply in education, knowing that our students will determine the future success of our economy and our Commonwealth."
The test was given to 2,075 students in 56 randomly selected public schools in Massachusetts. More than 600,000 students took the test worldwide.
Massachusetts students performed the best in math among eight other states that participated as individual entities. Only Minnesota scored as high as Massachusetts in science.
In science, Massachusetts narrowed an achievement gap between boys and girls, with boys scoring only slightly better. Boys had more significantly outperformed girls in the topic in both 1999 and 2007.
The tests did show students in lower-income schools scoring well below their peers. At schools where 75 percent of students were eligible for free and reduced lunch, students didn't perform measurably better in science or math than the scale average of all test-takers worldwide. Those averages were well below the Massachusetts averages on both tests.
The U.S. as a whole was ninth overall in math and 10th overall in science.