No one would ever describe the U.S. tax code as simple or straightforward. This becomes all the more true when you get to retirement and start to rely on various sources of income, many of which have different tax treatments.

Here, we break down how different types of retirement savings are taxed by the IRS to give you a sense of what you might owe and how your retirement strategy may be impacted.

SOCIAL SECURITY

Because Social Security provides guaranteed income for as long as you live, it’s typically a central part of a retirement income plan. The good news is that you don’t pay tax on your full benefit. How much you pay depends on how much you make in a given year in retirement. No surprise, figuring out how much you owe taxes on is complicated. But basically, you will never be taxed on more than 85 percent of your benefits and, in some cases, you may owe nothing. You can get a better sense of what you will pay based on your situation here.

QUALIFIED INVESTMENTS

This is what you have in accounts like your 401(k), 403(b) or IRA. This is money that hasn’t ever been taxed, so guess what? The government plans to collect tax on these assets when you retire. You will pay ordinary income tax on what you withdraw, based on your tax bracket (the more you take out in a year, the higher the percentage you may owe).

And, because the government wants to make sure it gets its money, it requires you to withdraw a minimum amount from your qualified accounts, even if you don’t need the income. Beginning in the year you turn 70 and a half, you are required to start making those withdrawals, known as required minimum distributions (RMDs). If you don’t withdraw enough, you’ll face a penalty. So it’s a good idea to calculate how much you’ll need to take out each year and make sure you’re not pushing yourself into a higher tax bracket if you don’t have to.

ROTH ACCOUNTS

Your Roth 401(k) or Roth IRA includes money that has already been taxed. So, bonus — you won’t owe any tax on this money. However, it’s worth noting that Roth 401(k)s are subject to RMDs. One way to avoid RMDs on a Roth 401(k) is to roll that money into a Roth IRA.

Many people ladder their income to be tax-efficient. For instance, you could take just enough from your qualified accounts up to a certain tax bracket, but then take from your Roth accounts to get additional income without crossing into a higher tax bracket.

NON-QUALIFIED INVESTMENTS

This is really any kind of investment that doesn’t qualify for special tax treatment (hence, the moniker non-qualified). For the sake of this article, we'll focus on stocks and bonds.

When you sell a stock, the amount you paid for the stock (known as the basis) is tax-free. But any money you made will be taxed. If you owned the stock for a year or less, you pay short-term capital gains — basically ordinary income tax. If you owned the stock for longer than a year, you pay long-term capital gains, which can be nothing, 15 percent or 20 percent depending on your income.

The way bonds are taxed is a little more complicated. When buying and selling bonds on the secondary market, you will pay capital gains tax like you would with a stock (same rules apply). If you hold a bond and earn the interest it pays, what you owe depends on the type of bond. Generally, you will owe ordinary income tax on bond interest; however, interest on municipal bonds is tax-free. Other government and savings bonds may have more limited tax benefits on the interest income. A financial or tax professional can help you understand more about how particular types of bonds may be right for your situation.

In many cases, you won’t own stocks and bonds directly because you will buy them through a fund, like a mutual fund. In that case, your taxes are based on the underlying investments in the fund. However, the people who operate the fund will make decisions about when to buy and sell investments the fund holds, which can result in you owing taxes. So it’s a good idea to get a sense of how a fund operates from that perspective.

PENSIONS

While pensions are mostly a thing of the past, some of us are still lucky enough to have one. For the most part, pensions work like a traditional 401(k), meaning the money wasn’t taxed as it went in. Because of that, you’re likely to owe ordinary income tax on pension income as you get it. But check on your specific circumstance, as there are some exceptions.

INCOME ANNUITIES

You can make both qualified and non-qualified contributions to an income annuity. As you get your annuity payouts over time, you will owe ordinary income tax on your qualified contributions and any earnings within the annuity.

However, you won’t owe taxes on any non-qualified contributions. In that case, the insurance company will pay out something known as a return of premium over time. Typically, a portion of your payment will include that return of premium while the rest of the payment will be taxable.

WHOLE LIFE INSURANCE

If you bought whole life insurance when you were younger, then you’ve likely accumulated a sizable amount of cash value. This is money that won’t decline with the market — which makes whole life insurance a good way to help mitigate a drop in the value of your investments during market downturns in retirement. Similar to other assets, you pay no taxes on your basis. Any gain is taxed at your ordinary income tax rate if you surrender your policy. However, if you borrow against your policy rather than withdraw the cash value through a surrender, you won’t owe tax on that amount as long as your policy stays in place.

This publication is not intended as legal or tax advice. Taxpayers should seek advice based on their particular circumstances from an independent tax advisor.

Recommended Reading