Cut your exposure to Medicare taxes

January 31, 2013, 3:00 PM UTC

FORTUNE — With a new debt ceiling showdown in front of us, the debate in Washington over how to curb costs for Medicare and Social Security is front and center. One of the most contentious issues is an approach called means testing — boosting costs and cutting benefits for more affluent seniors. What isn’t widely understood is that Congress voted for limited means testing years ago. And the entitlement cuts have been quietly engineered to smack an ever-growing number of retirees over time. Ironically, though, a provision buried in the recent fiscal-cliff deal could help many minimize the hit.

2013: The year we become the health care nation

The means testing of Medicare began in 2007, when high-income retirees were required to start paying higher premiums for Medicare Part B, which covers outpatient medical services, including doctor visits, lab tests, and emergency room visits. The Part B premium for most retirees in 2013 is $105 a month. But for seniors with incomes above $85,000 a year (or $170,000 for married couples), premiums start at $147 a month and can reach as high as $336.

The income thresholds, which used to be increased for inflation each year, were frozen under the Affordable Care Act (also known as Obamacare) through 2019. As a result, the number of seniors owing the higher Part B premiums will more than double by then, to about 10% of all beneficiaries, according to the Kaiser Family Foundation.

The controversy over Medicare reform

Social Security’s means-testing approach is far more draconian. It began in 1984, when the Social Security system faced a funding crisis and Congress passed a law requiring affluent retirees to pay taxes on up to 50% of their benefits. The tax kicked in when half the Social Security benefit plus a retiree’s other income exceeded $25,000 ($32,000 for couples). At the time, only about 10% of retirees had incomes high enough to trigger the tax. In 1994 a second layer of Social Security tax was added: up to 85% of benefits became taxable if half the Social Security benefit plus other income topped $34,000 ($44,000 for couples). None of those income thresholds were ever indexed to inflation. The result: About one-third of retirees are now paying federal income tax on their Social Security benefits.

The next entitlement crisis

The best way to minimize the blow from means testing is to put more of your retirement savings into a Roth IRA or Roth 401(k). Your contributions are made with after-tax dollars, but then all future investment gains and withdrawals are tax-free — and don’t count as income for triggering higher taxes or premiums on Social Security and Medicare. A provision in the fiscal-cliff deal now allows workers of any age to convert a traditional 401(k) into a Roth 401(k); previously, only workers over the age of 59½ could do so. Almost half of all large employers offer a Roth 401(k); check with your benefits department. At least Congress handed one favor to future retirees.

–A former compensation consultant, Janice Revell has been writing about personal finance since 2000.

This story is from the February 4, 2013 issue of Fortune.