People work their entire careers expecting to receive retirement benefits from Social Security. Once they've retired, they need every dollar they can get from the program to help make ends meet. What shocks many new retirees is that in some cases, the IRS steps in to take away a chunk of their Social Security by forcing them to include some of their benefits as taxable income.

The rules governing taxation of Social Security benefits suggest that having substantial income above and beyond what the program pays you is a requirement for any of your hard-earned benefits to get taxed. Yet the fact remains that nearly 20 million taxpayers include taxable Social Security income on their tax returns, and the amount of total benefits that get taxed make up a sizable fraction of the entire amount the Social Security Administration pays out every year.

Let's look more closely at how Social Security taxation came to be and just how the situation turned into a $277 billion issue for Americans.

Alarm clock on wood table behind piles of coins and refrigerator letter magnets spelling TAX.

Image source: Getty Images.

A short history of Social Security taxation

Social Security wasn't always taxable, but lawmakers implemented provisions making a portion of benefits subject to tax in the early 1980s as part of a broader reform package of the program. In order to raise additional revenue to fund a system that was at that time showing signs of financial strain, Congress implemented new rules that set income limits above which a portion of benefits would be taxable.

Initially, the intent among lawmakers was for the tax to be paid by relatively few retirees. The initial income thresholds were $25,000 for single filers and $32,000 for joint filers. If the sum of all of taxable income from sources other than Social Security plus to one-half of your Social Security benefits was greater than those thresholds, then you might have to include as much as 50% of your benefits in your taxable income. The way in which the calculation gets done is complicated, but in many cases, the actual taxable amount was less than 50%.

The problem is that lawmakers didn't build any inflation adjustments into those threshold figures. As a result, the same thresholds still apply, even as actual income levels have risen dramatically over that span of more than 30 years. In addition, subsequent changes to the law in the early 1990s added a second set of higher thresholds of $34,000 for singles and $44,000 for joint filers, above which as much as 85% of benefits could be subject to tax.

How much do today's taxpayers have to include in Social Security benefits?

As a result of those omissions, Social Security income taxes have hit a rising number of people. More than 28 million taxpayers listed Social Security benefits on their tax returns in 2015, the most recent year for which IRS data is available. Of those, almost 19.7 million, or 70%, had to include at least a portion of their benefits as taxable income. Both figures are up by about 700,000 from the previous year.

The amounts involved are truly staggering. Taxpayers included $277 billion as taxable income, which is more than 30% of the roughly $886 billion in total benefits the Social Security program paid out during 2015. Admittedly, many of the retirees who have to pay tax on benefits are already in relatively low tax brackets, so that $277 billion in income generated only about $31 billion in actual tax that year, according to figures from the SSA. Nevertheless, the average of $14,110 in included benefits among those returns that reported a non-zero number is far greater than lawmakers likely anticipated way back in the 1980s.

How to avoid Social Security income tax

There are a few strategies you can use to reduce or eliminate tax on Social Security benefits. The key is managing taxable income when you're receiving benefits. Many who take early benefits while they're still working fall into the taxation trap, but even after you retire, pension income or 401(k) distributions can push your taxable income high enough to trigger the tax.

If you have access to Roth-style retirement accounts, you can tap them without realizing income that would push you over the thresholds for Social Security tax. If not, being smart about timing taxable distributions from retirement savings, taking capital gains and losses on investments, and coordinating with your spouse can be instrumental in reducing your tax.

With Social Security still under financial strain, taxes on Social Security benefits aren't likely to go away. It's up to you to do what you can to avoid their impact during your retirement.