President Reagan is now in the same budget trap as his predecessors. His optimistic first estimates of federal spending have been belied in a way that makes the budget seem larger every time it is looked at. This is part of what has upset the financial markets and, if it continues, it could destroy Reagan's credibility just as it did President Carter's.

As recently as March Reagan said he would hold 1982 spending to $695 billion. By July this had crept up to $705 billion. This week he said that without new cuts next year's budget would swell to $722 billion, or even $726 billion if Congress were to spend up to the ceilings authorized in the July budget reconciliation act.

The main reason for upward creep under Reagan, as with other presidents, has been too much optimism. Higher than predicted interest rates added $10 billion to the 1982 budget estimate between March and July, and $5.5 billion more in the last two months. As the Congressional Budget Office forecast some while ago, and administration officials acknowledged this week, Reagan also was too optimistic in his program assumptions, his estimates of what programs would cost under given economic conditions. Some of this "lowballing" on technical estimates has now been overtaken by events and the administration has added $2.4 billion for farm price supports, $800 million for food stamps and $700 million for Medicare.

And while this week's new figures jump another step toward reality for 1982, yesterday's stock market drop shows that Reagan still has farther to go before he will be believed.

The president's latest budget numbers are still based on very optimistic assumptions about economic growth, and assume unrealistically low rates of spending in 1982 for defense contracts made in earlier years, which, according to Congressional Budget Office estimates, will cost $5 billion more than Reagan says. They also include as yet unspecified cuts of $2.6 billion in entitlement programs, and $3 billion in unspecified tax increases, for the fiscal year which begins next Thursday.

These assumptions allow him to project a deficit for 1982 close to the $42.5 billion to which he is committed. That is fine for now; his forecast is rosier than almost all others. But it runs the risk, if it turns out wrong, as many think it will, of making the policy makers look bad and increasing market skepticism.

There is, to be sure, one important way in which Reagan has differed so far from many predecessors. His reaction to a spending overshoot has so far been to seek more cuts, rather than shrug and accept a bigger deficit than projected. He and his advisers have stressed that cutting spending is a continuing process, and that this latest round of cuts disclosed by Reagan Thursday night on television is by no means the last.

But as is already clear, Congress may disagree. Unrealistic political assumptions can lead budget numbers astray just as can shaky forecasts for the economy.

Reagan is now going back to ask for more program changes, and for major cuts in some programs from the levels apparently agreed to just two months ago, at least partly to offset the effect of higher interest rates on projected outlays.

However, these earlier projections helped convince Congress it could safely slash taxes without creating a huge deficit next year. Rather than face another round of budget cuts now, many in Congress might have preferred to cut taxes less earlier this year.

The shakiest part of earlier Reagan economic forecasts always was the interest rate estimate. This has now been moved to an assumed 12.7 percent rate for new three-month Treasury borrowings in fiscal 1982, about in line with the assumptions of several other forecasters.

But if the Federal Reserve keeps to its tight money targets for next year--as Chairman Paul Volcker has promised he will--rates could be significantly higher unless there is a sharp slowdown in the economy.

Such a recession would pose another budget problem for Reagan. As the economy slows down, unemployment rolls swell and so does the cost of the unemployment benefits program. Even more importantly, as people earn less they pay fewer taxes. And if the Internal Revenue Service collects less money, either spending must be cut or the deficit will grow.

The administration is projecting economic growth of more than 5 percent during fiscal 1982. But few outsiders believe growth will be anything like that. The CBO, with a lower but still optimistic growth rate, projects tax revenues of $8 billion less in 1982 than the president, excluding the additional $3 billion of tax increases he proposed this week. Slower growth would mean several billion dollars less in the Treasury coffers next year, while adding smaller amounts to outlays.

Reagan's spending projections for fiscal 1983 and 1984 similarly assume that continued strong economic growth will offset a large portion of the mounting loss in revenues as a result of the string of tax cuts now in law. The president has withdrawn his May proposal for reducing some Social Security benefits, thus adding $6.2 billion to projected spending in 1983 and $9.6 billion in 1984.

To balance the budget in 1984, Reagan not only assumes that Congress will make all of the changes he wants this year, but also that it will agree to a further set of unspecified cuts totaling $23 billion. Presumably some of that would be new Social Security proposals, which a new 15-member task force comprised of House, Senate and administration appointees is to make by the beginning of 1983--just after the 1982 elections and well in advance of the 1984 elections.

Meanwhile, Reagan will be bracing himself for the likelihood that the next time he totes up the budget Congress will not have done exactly what he has asked. For instance, the administration now considers that action on nine non-defense bills by the House Appropriations Committee will boost 1982 outlays about $2.4 billion above his earlier targets, to say nothing of his new ones.

CBO, on the other hand, says the committee is only over a few hundred million dollars. But the administration is also counting against the committee more than $1.5 billion in outlays that will result from its failure earlier in the year to rescind as much in the way of prior year appropriations as Reagan asked.

So it goes with budget accounting. It is all but impossible even for the experts to follow. But the direction--up--is never in doubt.