(Fortune Magazine) -- There will be lots of celebrating in Washington next month when the Treasury announces that the federal budget deficit for fiscal 2007, which ends September 30, will have dropped to a mere $158 billion, give or take a few bucks.

That will be $90 billion below the reported 2006 deficit and will be toasted by the White House and Treasury as a great accomplishment.

Bush: Are the numbers going his way? The happy news that the budget deficit has fallen by $90 billion may produce unhappy long-term political results. More from Fortune Will Mmmhops be a hit?

NBA confirms L.A. Clippers sale to ex-Microsoft CEO Steve Ballmer

FBI and SEC probe into Carl Icahn and golfer Phil Mickelson

The numbers Here's how I come up with my budget numbers, based on the Congressional Budget Office's August 2007 update, which you can find at cbo.gov. Summary Table 1 of the introduction shows a projected total deficit of $158 billion for 2007, compared with $248 billion for 2006. Table 1-1, on page 2 of the report, shows a $186 billion surplus for Social Security. Table 1-7, p. 16, shows $108 billion of interest paid to the SS trust fund; hence, the SS cash surplus is $78 billion (186 minus 108). Also in Table 1-7, Treasury debt held by "other government accounts" is projected to be $1.725 trillion, up $97 billion from $1.628 in 2006. There's another $7 billion of "real" deficit that I can't account for, because these numbers total $441 billion and Table 1-7 shows an increase in "gross federal debt" of $448 billion for 2007. Let's just call it a rounding error.

But I have a nasty little secret for you, folks. If you use realistic numbers rather than what I call WAAP - Washington Accepted Accounting Principles - the real federal deficit for the current fiscal year is more than 2-1/2 times the stated deficit.

Why am I inflicting this information on you? Because there's been so much joyous noise about the budget emanating from Washington, despite the subprime mess and market meltdowns (which don't bode particularly well for future tax collections), that my natural contrarianism makes me feel like bombing the buzz machine.

In addition, so many investors (and speculators) are fleeing to the supposed safe haven of Treasury securities lately that it's a good time to take a look at what's really going on with the federal budget.

If a publicly traded corporation tried keeping books the WAAP way rather than the GAAP (Generally Accepted Accounting Principles) way, its auditors would be on the phone to the SEC before you could say "Sarbanes-Oxley."

But this is the federal government, which operates its unique budget accounting system, regardless of which party's running the show. Making the deficit look smaller than it really is helps those in power, be it today's borrow-and-spend crew or yesteryear's tax-and-spenders.

Let me show you how this works, using numbers from the recent update issued by the nonpartisan Congressional Budget Office. (I'm giving you the simplified version to keep your eyes from glazing over. You can find the detailed version in "The numbers" on the right.)

We'll start with Social Security, which will take in about $78 billion more in payroll and income taxes than it shells out. The Treasury takes that cash, gives the trust fund IOUs for it, and spends it. That $78 billion isn't in the stated deficit.

Wait, there's more. The Treasury will fork over $108 billion of interest on the trust fund's $2.2 trillion of Treasurys - but will give the trust fund IOUs, not cash. They won't count in the deficit either. Add that $186 billion to the stated budget deficit, and it more than doubles, to $344 billion.

The stated deficit, you see, measures how much less cash Uncle Sam takes in than he spends. That's fine for gauging the deficit's impact on the economy, which is what budget experts generally do. But if you're trying to assess Uncle Sam's overall fiscal condition, as I am, you should count those IOUs in the deficit because they have to be paid someday.

Now, let's move on. We end up with a total deficit of more than $400 billion by undoing another piece of WAAP ledger-demain: the $97 billion increase in Treasury securities held by "other government accounts," such as federal employee pension funds.

Thanks to the magic of Washington math, that doesn't increase the deficit, even though it increases the government's overall debt. Don't you wish you could keep books this way at home?

I worry that the happy news may produce unhappy long-term results by making politicians even less inclined than usual to inflict pain on voters by raising taxes or trimming future benefits to keep entitlements from overwhelming the public fisc.

Budget office Director Peter Orszag warns that at their current growth rate, Medicare and Medicaid will devour 20 percent of our gross domestic product in 2050 - more than today's entire federal budget. Yech!

So even though the deficit's smaller than it was and financial markets (for now) love Treasury securities, don't take next month's budget numbers at face value. If you do, you're setting yourself up to be WAAPed.