Ronald Reagan has a problem. He has gone to extraordinary lengths to slash federal spending and yet he is going to have in 1982 the largest budget deficit in history.

Not only is this fiscal year's dose of red ink likely to be in the range of $85 billion to $100 billion, far above Reagan's initial goal of $45 billion and the record of $66 billion set by the Ford administration in 1975, but the prospects for 1983 and 1984 are just as bad. Even with further non-defense spending cuts and excise tax increases, the deficits are likely to be close to $100 billion each year, according to a number of private budget analysts.

Against a background of hundred-billion-dollar red-ink oceans, Reagan's waterfight with Congress last week over $2 billion in spending was far more symbolic than substantive. However, the confrontation should also serve as a warning to Reagan that he probably cannot achieve additional reductions large enough to lower the prospective deficits significantly.

Economist Alan Greenspan, an outside adviser to Reagan, expects the deficit to reach $85 billion this year as a result of the combination of recession and tax cuts. His estimate for the fiscal 1983 deficit is a whopping $109 billion.

Because of the recession, federal outlays are currently increasing for a variety of programs, including unemployment benefits and food stamps which are sensitive to the state of the economy. Meanwhile, tax receipts are falling short of earlier projections because personal incomes and corporate profits are lower than expected.

Reagan's original budget for 1982, with its projected $45 billion deficit, was based on reducing federal programs by $41.4 billion. The cuts were to occur at the same time the economy would be expanding rapidly as a result of the personal and corporate income tax cuts the president also proposed.

Congress, in fact, made most of the original budget cuts Reagan sought, though some programs were cut more and some less than he proposed.

But the economy and the public were not nearly so cooperative. Interest rates soared earlier this year, adding billions to interest payments on the federal debt. More people than expected turned up to get food stamps, Medicare benefits and other so-called entitlements.

As this bad budget news became clear, Reagan chose to reduce the first stage of his personal income tax cut from 10 percent to 5 percent. Along with some other changes, this meant that 1982 tax receipts would be about $12 billion more than under Reagan's original proposal. The president also proposed reducing Social Security benefits by $3.8 billion. By July, the president thus was pointing toward a $42.5 billion deficit.

However, spending estimates kept rising and the economic outlook kept deteriorating. David A. Stockman, director of the Office of Management and Budget, and several other administration officials began to urge the president to accept the fact that the deficit would be much larger than $42.5 billion. That would be the case, they argued, even if Reagan sought a new round of spending cuts--including for the first time reductions in planned increases in defense outlays--as well as some tax increases.

Reagan resisted. In late September he conceded only that the 1982 deficit would rise to $59.1 billion and proposed $16 billion worth of "savings" to bring it down to $43.1 billion. Included in his list of "savings" were $2 billion to be cut from defense spending, $8.4 billion from non-defense spending, $2.6 billion from payments for entitlements programs such as Medicare, Medicaid and food stamps, and $3 billion from "revenue enhancement"--a new euphemism for a tax increase. The president also dropped all thought of reducing Social Security benefits in 1982 and instead asked Congress to rescind reductions in minimum benefits it had already approved.

Since September, budget matters have gone from bad to worse for the president. Because of congressional resistance he has dropped revenue enhancement and entitlement cuts for the moment, and his struggle with Congress over getting even half of the cuts in non-defense spending led to last week's confrontation.

The onset of recession, though, has done the most damage. The original budget figures assumed a healthy economy that would grow by 4.2 percent by 1982. Now, even if the recession hits bottom in the spring and there is a brisk recovery under way in the second half of the year, the economy will decline rather than increase. Greenspan, for instance, pegs the drop at 1 percent.

A swing of 4 or 5 percentage points in the rate of economic growth is a disaster for the budget that no amount of cuts in spending can offset. Trying, in fact, may only make a recession worse.

But if a recovery does begin at midyear, why will the fiscal 1983 deficit not come down? There are two reasons:

First, the level of economic activity in 1983 will still be depressed and far lower than the administration initially forecast. The average unemployment rate will probably be only about one-half to three-fourths of a percentage point lower in 1983 than in 1982.

Second, larger personal income tax cuts will occur on July 1 next year and again on July 1, 1983. Those cuts will come just as this year's business tax cuts also begin to involve large revenue losses.

All of the cuts, of course, are supposed to spur saving, investment and economic growth. An immediate surge in business spending for new plants and equipment is not in the cards when the economy is still depressed and utilization of the nation's existing productive capacity is low.

Any response to the tax cuts is, in terms of investment, apt to be delayed beyond 1983.

Reagan has acknowledged that he will not be able to reach his goal of balancing the budget in 1984. He has not, however, yet acknowledged how far he may miss it.

As Donald Ratajczak, a respected economist at Georgia State University, warns, the current federal budget deficits "show little tendency to decrease even after economic recovery begins."

Ratajczak looks for deficits of more than $94 billion in both 1982 and 1983. And like most other private forecasters, he thinks they will stay high unless and until Reagan decides to increase taxes.

That is where the president's budget problem stands today. Any further confrontation with Congress on Dec. 15, expiration date for the latest continuing resolution under which most of the government is operating, will not change the nature of that problem.