Elementary and middle school pupils in Prince George's County performed at or near national averages on standard math and reading tests this year, hanging on to slow but steady gains made over the last two years, according to scores released by school officials yesterday.

School officials said that the most significant improvements in performance on the California Achievement Test were made by the 7,806 fifth graders tested this year.

When those students were tested as third graders in 1980, their scores were three months below the national norm in reading and two months behind in math. Test scores this year for those same students--now in the fifth grade--showed they were only one month behind in both math and reading, school officials said.

"They are closing that difference (from the national average) very nicely," said Elwood Loh, who is in charge of testing for the county school system. "And in some areas they're ahead," he added, referring to the language and spelling portions of the achievement test.

In language, third graders scored two months above the national norm and in spelling they scored one month above the national norm.

Fifth graders were four months ahead of the national norm in language and six months above the norm in spelling.

Scores were expressed in years and number of months of schooling. For example, if a student took the test in the second month of the third grade, and got an overall score of 3.4, that meant he was two months ahead of the expected performance for students at his school level.

Test results showed that when language and spelling were combined with reading and math for an overall score, Prince George's third and fifth graders exactly equaled the national norm and eighth graders exceeded the norm by 2 months.

Of all three grades tested, only the eighth graders exceeded the national norm in math scores--by two months.

The school system administered the achievement test to a total of 23,510 third, fifth and eighth graders last October. The California Achievement Test was first given in the county in 1980.

School spokesman Brian J. Porter said that the system maintained its overall improvement in scores despite the upheaval caused by 43 school closings, 507 teacher layoffs and other disruptions since 1980. "Maybe now we can go forward," Porter said.

But Loh cautioned that with the gap between Prince George's and the national averages nearly closed, the school system's continued fight to move its students' performance beyond the national norm will be even tougher.

Test scores in Montgomery County rose for the third straight year, according to figures released last week, with more than 75 percent performing above national averages. Northern Virginia and District of Columbia schools do not use the California Achievement tests.

The Prince George's test scores showed wide variations among 152 elementary and middle schools where students were tested. School officials attributed the discrepancy to a wide variety of family backgrounds among county students.

"I can look and see where kids come from-private homes with few disruptions or where kids feed in from apartments with high turnover rates-just by looking at the numbers," one school official said.