It has been the greatest disappearing act since Houdini.

Over the last 27 months, more than $22 billion the federal government planned to spend seemingly vanished. And experts predict that a big chunk of the $458.3 billion Congress expects to shell out in fiscal 1978 (which starts Oct. 1) will not be spent by the time the year is on next Sept. 30, 1978.

That is not an entirely unpleasing prospect to many conservatives who dislike the $61.3 billion deficit Congress anticipated when it gave final approval to its 1978 budget last Thursday. The President projects a similar-sized $61.5 billion deficit next year. Less spending would mean less red ink.

But to administration and congressional policy makers who try to use federal spending to keep the economy moving along a desired course, the government's inability to project what it will spend is vexing and potentially dangerous.

And to those members of the administration and Congress who are charged with predicting spending, the disappearing outlays are a little embarassing, too.

Most perplexing of all, however, no one - at the Congressional Budget Office, the Office of Management and Budget or the House and Senate budget committees - seems to know why the government cannot spend what it says it will and what shapers of economic policy want it to.

The so-called spending shortfall also causes headaches for the Treasury Department, which borrows money for the government to bridge the gap between tax receipts and outlays. Last February, the Treasury was prepared to borrow enough money to cover a $68 billion federal deficit in fiscal 1977. That deficit is now expected to be only $45 billion. Not all that difference is due to the shortfall, however. The President also abandoned a $12 billion tax rebate designed to stimulate the economy.

The spending shortfall has concerned policy makers for more than two years. It has been analyzed and re-analyzed by the Office of Management and Budget. House and Senate committees have held hearings on it. The slowdown in the economic recovery last year has been blamed on it. And if the current lull in economic growth continues for much longer, the shortfall is likely to be blamed again.

Several things are clear:

The difference between anticipated and actual outlays is not concentrated in a single area of government spending. A shortfall is as likely to occur in defense as in housing, in foreign military sales as in job training. And in fiscal 1977, it happened in all four areas as well as many others.

It has been going on for a long time, although the new congressional budget process which began for real in fiscal 1977 (and on a trial basis in 1976) brought the shortfall to the attention of the public.

An end to the spending lag is not in sight.

There are almost as many explanations for the disappearing dollars as there are categories in the federal budget. Sid Brown, the top budget analyst for the Senate Budget Committe, noted that there are few, if any, penalties for program managers who overestimate what they will spend as well as a natural tendency on the part of these managers to believe they will be able to spend more than is realistic. There is, however, much difficulty for an agency head who discovers he must spend more than he projected.

Dale R. McOmber, assistant director of the Office of Management and Budget, said that agencies have "always overestimated for years." Top OMB career officials have fought to get agencies to estimate more realistically "and we've not been successful," McOmber said.

A case in point is the economic stimulus program proposed by the President and enacted by Congress early this year. The package was designed to pump money into the economy quickly through public service jobs and public works project. But despite the best efforts of administrators to "get the money out," the economic stimulus program has put into the economy about $800 million less this year than Congress hoped it would.

In some cases, of course, outlays are below estimates because not as many persons show up for an entitlement program (one in which anyone meeting the program's qualifications automatically receives the benefits) as planners expect. For example, if the economy improves faster than anticipated, there will be fewer applications for unemployment benefits than the budget allows for.

McOmber acknowledges the new congressional budget process, with its emphasis on binding ceilings, probably encourages agencies to overestimate their outlays to avoid being caught with too low a ceiling.

"It's hard to identify any evidence to support that," McOmber says, "but it seems like it ought to be right."

The emphasis on outlays by Congress and federal agencies is a new one. While presidents traditionally have proposed budgets with spending and revenue estimates, it was not until Congress adopted its budget process that lawmakers become concerned with not only how much money a program would cost over its life but within which fiscal year what money would be spent.

What Congress gives agencies is the authority to spend money (budget authority) that is translated into an outlay when a government check is issued. In many government programs, it takes several years to deplete that budget authority through outlays.

In fact, when the first evidence of shortfalls hit the public eye in 1976, analysts suggested that much of it might have occured because outlays were delayed. A check that was supposed to be written on Sept. 30 but was written on Oct. 2 would help narrow one deficit but would add to it in the following fiscal year.

Between July 1, 1975, and Sept. 30, 1976, the government spent either $11.1 billion (using Congress' targets) less than planned. Administration officials and those moulding that those missing outlays would show up in fiscal 1977.

Instead, another $11 billion in projected spending has vanished in fiscal 1977.

Officials seem resigned to a continuing shortfall in 1978. Rep. Paul Simon (D-III.), a member of the House Budget Committee, admitted in floor debate on final passage of the 1978 budget last Thursday that spending would likely fall $5 to $8 billion short of the $458.3 billion Congress projected.

The Office of Management and Budget has turned everything upside down to try to get to the bottom of the shortfall, but it has been relatively unsuccessful. A study in the fall of 1976 came up with a number of reasons, including weather-caused construction delays, unanticipated environmental actions, congressional delays in passing appropriations and a surprising number of strike-related and other labor delays.

A more detailed OMB analysis of 50 accounts was begun in May and completed in early July. It still failed to come up with a simple culprit.

According to an internal OMB estimate, defense spending is $1.5 billion below projections, foreign military sales are $2 bilion down, environmental protection spending (mainly for waste treatment) is down $1.5 billion.

A final problem is the inherent conflict with the budget as a wish list, as an agenda of the government's aspirations, and as a statement of what is really going to happen.

Rep. Robert N. Giaimo (D-Conn.), chairman of the House Budget Committee, worries that the conflict could undermine the credibility of budgeting.

Rep. Glenn Anderson (D-Calif.) has long wanted to boost pension benefits for World War I veterans and got the House to approve a $700 million boost in both projected outlays and budget authority to make room for such a pension boost in fiscal 1978.

As Giaimo noted, there is no chance that such a boost will be enacted into law, but the budget makes provision for it. That boosts the projected deficit by $700 million, making the budget more unpalatable to conservatives. But when the fiscal year closes and the benefits are not enacted, that $700 million becomes a shortfall.

In fact, much of the boost was knocked out in conference and Anderson conceded to Giaimo.

But such divergence between plan and reality leads to budgets that are bigger than actually needed, Giaimo contends.

And somehow, somewhere in a government that is noted for its ability to spend, not its frugality, lurks the budget authority that could possibly erupt into spending at a time when those rueing the shortfall least expect it.