THE SIZE OF the federal budget deficit is drawing more hostile attention than ever, as congressional anxieties over inflation rise. There seems to be a prevailing inclination to regard federal deficits as a national bad habit, like smoking, to be broken by exercise of will power. It's quite true that in the past several years the deficits have been, by any previous standard, stupendous. The rule has always been that a bigger deficit means greater stimulation of business activity - and yet, despite a $45-billion deficit last year and one estimated at $53 billion this year, the current growth rate is a best uncertain.

The explanation is that the federal government tilts its budget to counterbalance other things that have gone awry in the economy. Before Congress gets carried away with deficit-reduction fever, it might want to consider a bit more carefully what that deficit is offsetting. Before you take away the prop, you're always wiser to find out what it's holding up. In this case, there are three points at which the American economy has got monumentally out of line since the last recession four years ago.

1) State and local governments are suddenly running a gigantic surplus. It's now something over $30 billion a year and, apparently, rising. About half represents the sums being paid into state and local employee's pension funds. The rest results from inflation, which raises taxes at a time when circumstances - the effect, for example, of falling birth rates on school costs - are slackening the pressure for state and local spending.

2) The United States is spending vastly more abroad than it earns. The net outflow on goods and services was $20 billion last year, and so far this year it's running substantially higher. This outflow is due partly to the very large American imports of foreign oil. Partly it's due to low economic growth in other countries, reducing the demand for American exports. President Carter's energy policy, and business conditions in Japan and Europe, are all elements in setting the size of the U.S. budget deficit.

3) American business is investing somewhat less, currently, than it has usually done at this stage of the business cycle. By the end of last year the shortfall in business investment appeared to be running in the range of $6 billion.

Each of those three factors represent purchasing power that is being taken out of the U.S. economy or, in the case of investment, expected and accustomed purchasing power that isn't being put in. If you add the three together - $30 billion in state and local surpluses, more than $20 billion in foreingn deficits, a $6-billion shortfall in business investment - it comes to a total that's even a little larger than the $53-billion federal budget deficit. That's why the country can run a huge federal deficit without seeing any great spurt of economic growth.

The point of this arithmetic exercise is a simple one. There is a danger in reducing the federal deficit, if all those other imbalances continue to run at their present levels. The purpose of the deficit is to restore, at one point in the ecnomy, the purchasing power that is being drained out at others. Those drains, if they are not offset, will make the economy run more slowly until, before long, it tips into another recession. The safe way to cut the federal deficit is to begin by reducing the state and local government's surpluses, curbing the foreign deficits and encoraging more business investment.