The battle of the budget within the Carter administration has generated a numbers game over how much subsidized housing the government can finance with limited dollars.

The Office of Management and Budget says the Department of Housing and Urban Development can make commitments for about 330,000 units-close to what it is now doing-with budget authority of about $23.5 billion for the 1980 fiscal year.

But HUD has argued that such an amount, down from the current $31 billion in budget authority, would mean a cut of about one-third in its programs for rent-subsidized and public housing.

A decision by President Carter is several weeks off, but the final horse-trading sessions between HUD and OMB are scheduled to start today.

Several administration sources said the main dispute involves how much it costs to subsidize a rental unit for people of low to moderate income.

HUD says the average varies from about $3,800 to $4,500 this year, depending on the type of unit. (Housing for the elderly usually costs more than basic rent-subsidized units).

OMB, however, says there is no reason why HUD could not figure the cost at $3,400 to $3,700 which is the range for unsubsidized units insured by the Federal Housing Administration.

HUD says those unsubsidized units are usually not built for large families and housing for such people costs more to construct. It also says that more FHA-insured housing is built in the South and the West, where production costs are lower than in the North and the East.

Another dispute involves the kind of housing to subsidized. HUD, relying on housing plans submitted by communities across the country, wants to stress new construction or substanial remodeling of existing units. OMB wants it to focus on existing units that do not need much repair.

An administration source said OMB plans to "put back the cuts in the subsidies so that HUD can do about the same amount of housing that it is doing now." But he warned that, in return, HUD would have to give up several new programs it has proposed, including one costing $1.3 billion that would promote integrated rental housing for people of various income levels.

"They tried to sneak in some new programs," he said. "But this is an austerity budget, and there aren't going to be any new programs."