Which federal program took in more than it spent last year, added $95 billion to its surplus and lifted 20 million Americans of all ages out of poverty?

Why, Social Security, of course, which ended 2011 with a $2.7 trillion surplus.

That surplus is almost twice the $1.4 trillion collected in personal and corporate income taxes last year. And it is projected to go on growing until 2021, the year the youngest Baby Boomers turn 67 and qualify for full old-age benefits.

So why all the talk about Social Security “going broke?” That theme filled the news after release of the latest annual report of the Federal Old-Age and Survivors Insurance and Federal Disability Insurance Trust Funds, as Social Security is formally called.

The reason is that the people who want to kill Social Security have for years worked hard to persuade the young that the Social Security taxes they pay to support today’s gray hairs will do nothing for them when their own hair turns gray.

That narrative has become the conventional wisdom because it is easily reduced to a headline or sound bite. The facts, which require more nuance and detail, show that, with a few fixes, Social Security can be safe for as long as we want.

SHIFTING TAX BURDENS

Let’s look at how Social Security taxes have grown in the last half century — a little-known tale of tax burdens shifted off the rich and onto workers. From 1961 through 2011, the year covered in the last Social Security report, Social Security taxes exploded from 3.1 percent of Gross Domestic Product to 5.5 percent.

Income taxes went the other way. The personal income tax slipped from 7.8 percent of the economy to 7.3 percent, with most of the decline enjoyed by people in the top 1 percent of incomes. The big drop was in the corporate income tax, which fell from 4 percent of the economy to 1.2 percent. Notice that the corporate income tax fell by 2.8 percentage points, an amount almost entirely offset by a 2.4 percentage point increase in Social Security taxes.

The effect has been to ease the taxes of the wealthy, while burdening the vast majority of workers. Considering how highly ownership of stocks is concentrated, the benefit of those lower corporate taxes went overwhelmingly to the top 1 percent and, especially, the top 1 percent of the top 1 percent. Considering that the Social Security tax is capped, most of the burden of the increased payroll tax went to the bottom 90 percent.

Now let’s look at how that $2.7 trillion Social Security surplus arose. In 1983, President Ronald Reagan sponsored an increase in Social Security taxes, changing the program from pay-as-you-go to collecting much more taxes than it paid in benefits. The idea was to have the Boomers prepay part of their old age benefits. The extra tax was supposed to pay off the federal debt and then be invested in federal bonds. Instead, Reagan ran huge deficits, violating his 1980 promise to balance the federal budget within three years of taking office.

FINANCING TAX CUTS

In my view, building the Social Security surplus has had two major effects.

One effect was to finance tax cuts for those at the top, whose highest tax rate fell during the Reagan years from 70 percent to 28 percent, and for corporations, whose rate fell from 50 percent of profits to 35 percent. Those with less subsidized those with more.

The other effect was a huge increase in consumer debt, as Americans saddled with higher Social Security taxes took out loans to cover other needs. Stagnant wages played a role, but the $2.7 trillion Social Security surplus is also a factor in a $1.5 trillion increase in consumer debt since 1984.

It is no wonder consumers have gone into debt. Paying a tax in advance is expensive. Indeed, the first lesson in tax planning is that a tax deferred for 30 years is effectively a tax avoided, provided the money is invested wisely. The reverse is also true. A dollar of tax paid in 1984 cost $2.20 in today’s dollars, and that’s before counting the interest that could have been earned.

With the coming bulge in retirees, Social Security will start to pay out more than it takes in 2021, according to projections in the latest annual report. Under current law the program would be able to pay only about three-quarters of promised benefits starting in 2033. But that scenario can easily be avoided through a combination of four policy changes that would ensure full benefits continue to be paid, though I fear Congress will continue to do nothing.

One would be restoring the Reagan standard that 90 percent of wages are covered by the Social Security tax, which now applies to only 83 percent of wages. If we went back to the Reagan standard, the Social Security tax would apply to close to $200,000 of wages this year instead of $110,100.

Two would be raising the Social Security tax rate by two percentage points. That tax hike could be smaller or even avoided if, three, we reignited the growth in wages. Median wages have fallen in 2010 back to the level of 1999. And, four, it would help just as much if we created millions more jobs, which since 2000 have grown at only a fifth the rate of population increases.

Under current tax rules, the Social Security shortfall for the next 75 years is $8.6 trillion.

But there is a much bigger problem that needs our attention. If we continue national security spending at current levels, with no future increases, the total cost would be $63 trillion, based on the figures in President Barack Obama’s latest budget. Unlike spending on Social Security, much of the national security spending goes overseas. And that makes us worse off.