Healthcare and the solvency of Social Security usually top the list of concerns about retirement costs for a good reason. But they're not the only things that could threaten your future financial security. Just ask those still in their first decade of retirement. A recent Nationwide survey found that 34% of recent retirees say they wish they'd been better prepared for taxes than they were.

This is down from the 46% of recent retirees who responded this way in last year's survey, but it's still a considerable figure. The same survey found that 23% of recent retirees and 30% of those who expect to retire within the next 10 years are terrified about what taxes will do to their retirement income.

Mature woman on laptop looking concerned

Image source: Getty Images.

The bad news is, you're probably never going to get out of paying taxes in retirement completely. But careful planning can help you reduce how much you owe. Planning in advance of your retirement can also help you figure out how much you must save to comfortably afford your lifestyle and the taxes that come with it. Here's a closer look at how the government taxes retirement savings, other investment income, and Social Security benefits.

Retirement account taxes

Retirement accounts are split into two different types based on how they're taxed. Contributions to tax-deferred accounts, including traditional IRAs and most 401(k)s, reduce your taxable income in the year you make the contribution, but then you must pay taxes on your distributions in retirement. Roth account contributions do not affect your taxable income that year, but then you don't owe taxes on your distributions. 

Choosing the right accounts to contribute to can help you hold on to more of your cash in retirement. Tax-deferred accounts are best if you believe you're in a higher tax bracket today than you will be in once you retire. By delaying taxes until then, you'll lose a smaller percentage of your savings than you would by paying when you were younger. Roth accounts make more sense if you'll be in the same or a higher tax bracket once you retire. You can also put some savings in each if you're unsure. 

Be smart about your withdrawals in retirement to help reduce your tax bill further. Watch the tax brackets for the year, and if you're nearing the top of yours, consider relying on Roth savings for the remainder of the year, if you have them. These savings will not add to your tax bill anymore, so you'll lose a smaller percentage of your income to the government.

You can't forget about required minimum distributions (RMDs) either. These kick in at 70 1/2, unless you're still working and own no more than 5% of the company you work for. They are the minimum amounts you must take from each of your retirement accounts for the year, except Roth IRAs. You can calculate yours by dividing each of your retirement account balances by the distribution period for your age in this table.

Sometimes, RMDs might force you to withdraw more money from your retirement savings than you wanted to, but failing to take them results in a 50% penalty on the amount you should have withdrawn. That could be more costly than your higher tax bill. You could either withdraw the larger sum and pay a little more in taxes or donate the extra money you aren't using to a charity. Then, it becomes a tax deduction and won't affect your tax bill.

Capital gains tax

You don't have to worry about capital gains tax unless you have a taxable brokerage account. This is an investment account anyone can use, and it doesn't have limitations on how much you can contribute each year or when you can withdraw the funds, though it also doesn't offer the same tax breaks as retirement accounts. But holding on to your assets for at least a year before selling can help you save a little in taxes. Short-term capital gains for assets you've held for less than one year are subject to income tax, but assets held for a year or more are subject to long-term capital gains tax. 

Long-term capital gains tax applies to your investment earnings, not your contributions. You'll always have to pay income taxes on those in the year that you earn them. But you may not owe long-term capital gains taxes on your earnings if your income is low enough. Even if you do, you'll pay less than you would if you'd owed income tax on the same amount. Here are the 2020 capital gains tax brackets based on your taxable income and tax filing status:

Tax Filing Status

0% Tax Bracket

15% Tax Bracket

20% Tax Bracket

Single

Less than $40,000

$40,000 to $441,450

More than $441,450

Married Filing Jointly

Less than $80,000

$80,000 to $496,600

More than $496,600

Married Filing Separately

Less than $40,000

$40,000 to $248,300

More than $248,300

Head of Household

Less than $53,600

$53,600 to $469,050

More than $469,050

Data source: IRS.

Most people will fall in either the 0% tax bracket or the 15% tax bracket. You may be able to avoid paying taxes on your long-term capital gains by carefully choosing which accounts you make retirement withdrawals from to help reduce your taxable income for the year. Note that the above tax brackets change from year to year, just like income tax brackets, so you must check the new ones every year when planning how much you are going to spend and which accounts you're going to take that money from.

Social Security benefit tax

You could owe taxes on some of your Social Security benefits if your combined income exceeds certain thresholds. Combined income is your adjusted gross income (AGI) -- income minus some tax deductions -- plus any nontaxable interest and half of your Social Security benefits. 

Single adults with a combined income exceeding $25,000 and married couples with a combined income exceeding $32,000 could pay taxes on up to 50% of their Social Security benefits. Single adults with combined incomes over $34,000 and married couples with combined incomes over $44,000 could owe taxes on up to 85% of their benefits. But just because you could owe taxes on this much doesn't mean you will. A full discussion of Social Security benefit tax is beyond the scope of this article, but here's a more in-depth look if you're interested.

Delaying Social Security until you're fully retired might help reduce your combined income so you don't owe taxes on your Social Security benefits at all. Being smart with your retirement account withdrawals can also help.

As I said at the beginning of this article, you probably won't be able to avoid taxes in retirement completely. But if you understand how much you might pay, you can better assess how much you can safely spend and how much you should save before retirement to be able to afford all of your expenses, including taxes.