Defense Department officials and lawmakers on Thursday clashed over multimillion-dollar discrepancies in Pentagon billings for arms shipments to other countries.

Some of the differences are in favor of the United States, some in favor of the purchasing countries. But there was little agreement on how much.They total "just over $1 billion," said Rep. Ben Erdreich, D-Ala., who presided over a hearing of the House Government Operations subcommittee on national security.

But Frederick D. Wolf of the General Accounting Office, the investigative arm of Congress, said that at the end of last year the discrepancies amounted to $230 million or $400 million, depending on the way they were added up.

Wolf said the Pentagon paid out $52.7 million more on arms and services for Saudi Arabia at the end of 1987 than could be accounted for, $7.9 million for Britain and $6.7 million for Turkey.

On the other hand, it reportedly had provided Spain with $15.9 million more in value than has been charged against Spain's account and $7.7 million for Tunisia in excess of charges.

Derek J. Vander Schaaf, the Pentagon's deputy inspector general, said that one way of counting country by country put the total of discrepancies at about $1.5 billion. However, he said $565 million was more fair.

Lt. Gen. Charles W. Brown, who said he was new to the job as head of the Defense Security Agency, put the net unreconciled balance at the end of 1987 at $228 million, and $401 million on a country-by-country count.

"We have made very significant strides in addressing the unreconciled balance," he said.

Vander Schaaf was skeptical.

"I think the differences are going down but I wouldn't stake my life on it," he told a reporter after the hearing.

Wolf was not satisfied either.

"After more than 10 years of improvement efforts by the Department of Defense, we see no good excuse for the current state of Foreign Military Sales Accounting," he said.

Brown said no audit had ever identified a misuse of the funds.