Baby boomers will transfer a jaw-dropping $30 trillion in wealth to their heirs over the next 30 to 40 years, and a lot of that wealth will be in the form of IRAs and employer-sponsored plans. Baby boomers widely used these plans to reduce their tax bill over their lifetime, but once you begin withdrawing money from them, the IRS will come knocking for its share.

Uncle Sam's share

Planning on buying your dream car, traveling the world, or, more wisely, paying off your mortgage with the money you've inherited in an IRA or 401(k)? If so, prepare to fork over a big chunk of your inheritance to the IRS. While traditional IRAs and 401(k) plans are great tools for saving because they defer taxable income so that more money gets invested, you'll face a big tax bill if you cash in these accounts after inheriting them.

A woman holding her head in her hands.

IMAGE SOURCE: GETTY IMAGES.

Unless you're the spouse of the account owner, the IRS requires you to begin withdrawing money from these accounts after the account owner's death. Without careful planning, these withdrawals can move you up into the highest income-tax bracket, and that can mean you have to hand over up to 39.6% of your inheritance to the IRS.

Reducing your tax bill

Spouses can treat inherited IRA and 401(k) assets as if they are their own IRA or 401(k), but if you're a non-spouse, the IRS mandates that you begin withdrawing money from traditional IRAs or 401(k)s following the account owner's death, but it gives you a few choices on how to do it.

First, you need to consider how old the account owner was at the time of their death. If the person died after reaching age 70.5, then his or her tax-deferred accounts are already subject to rules governing required minimum distributions. In this situation, you only have two choices as a non-spouse beneficiary: a lump sum or annual withdrawals based on your life expectancy.

If the account owner died before turning 70.5, which is when required minimum distributions must begin from these accounts, non-spouse beneficiaries can take a lump sum or roll these accounts into an inherited IRA, which allows them two options: Withdraw money within five years of the account owner's death or spread the withdrawals out over the your lifetime.

In terms of taxes, the most expensive option is the upfront lump-sum withdrawal. Income tax brackets rise significantly with income, and since a lump sum from a traditional IRA or 401(k) plan is considered income, you can quickly find yourself forking over a substantial share of your inheritance to the IRS.

Tax Bracket Income Range
10% $0-$9,325
15% $9,326-$37,950
25% $37,951-$91,900
28% $91,901-$191,650
33% $191,651-$416,700
35% $416,701-$418,400
39.60% $418,401 and above

Data source: IRS.

A much better option is to spread out your withdrawals for as long as possible. Doing so minimizes your income from these accounts every year and hopefully helps you avoid getting pushed up into a higher income-tax bracket. The life expectancy option could allow you to stretch out your income tax bill over decades, saving you thousands of dollars in taxes, while also giving your inheritance more time to grow tax-deferred. That's a savvy strategy.