American fourth- and eighth-grade students made solid achievement gains in math in recent years and in two states showed spectacular progress, an international survey of student achievement released on Tuesday found. Science performance was flat.

The results showed that several Asian countries continued to outperform the United States greatly in science and math, subjects that are crucial to economic competitiveness and research.

The survey, the Trends in International Mathematics and Science Study, or Timss, found that fourth-grade students in Hong Kong and eighth-grade students in Taiwan were the world’s top scorers in math, while Singapore dominated in science at both grade levels.

“We were pleased to see improvements in math, and wished we’d seen more in science,” said Stuart Kerachsky, acting commissioner of the National Center for Education Statistics at the Education Department, which carried out an analysis of the performance of American students on the test.

The latest Timss study, the world’s largest review of math and science achievement, involved testing a representative sample of students in each country in 2007, the first time the tests had been administered since 2003. The results included fourth-grade scores from 36 countries and eighth-grade scores from 48 countries. The tests cover subjects taught in all the participating countries, including algebra, chemistry, geometry and physics.

The study is directed by the International Study Center at Boston College.

Asia’s continuing dominance in math and science, first demonstrated in the 1990s, was especially apparent in the latest results, which showed rising percentages of high-scoring students there.

Nearly half of eighth graders scored at the advanced level in math in Taiwan, Korea and Singapore, compared with 6 percent of American students.

Comparing educational performance in the United States, a diverse country of 300 million people with 50 state educational systems, with city-states like Singapore and Hong Kong, which have populations of 4.5 million and 6.9 million people, respectively, is a bit of apples and oranges.

Still, experts said the Timss study again confirmed the tremendous gains those societies had made in just a few decades.

“It was good to see that the United States has made some progress in math,” said Ina V. S. Mullis, co-director of the Boston College center, “but I was surprised by the magnitude of the gap between us and the highest performing Asian countries, and that should cause us some concern.”

Students in Massachusetts and Minnesota, which participated in a special study that attributed a score to the states as if they were individual countries, also demonstrated stellar achievement, outperforming classmates in all but a handful of countries.

In eighth-grade science, for instance, Massachusetts students, on average, scored higher than or equal to students in all countries but Singapore and Taiwan.

And in Minnesota, which has worked to improve its math curriculum, the proportion of fourth-grade students performing at the advanced level jumped from 9 percent in 1995 to 18 percent in 2007, a gain that was one of the world’s largest.

But on average, the results showed several Asian countries increasing their dominance.

In the fourth-grade math survey, scores in Hong Kong, Singapore, Taiwan, Japan, Kazakhstan, Russia, England and Latvia were higher than in the United States.

Average scores were equal to the United States in the Netherlands, Lithuania, Germany and Denmark. Scores in 23 other countries were significantly lower.