If you’re thinking about closing a retirement account such as a 401(k) or IRA, you may be wondering whether you’ll owe taxes on it. The answer depends a lot on what you’re doing with the money, but the good news is you have some options that won’t cost you anything in taxes.

Here’s how to determine whether you’ll owe taxes if you close a retirement account.

Here’s when you’ll pay taxes if you close a retirement account

Whether you run up taxes when you close a retirement account depends on what exactly you’re doing with the money. But closing the account doesn’t necessarily mean you’ll generate a taxable event.

When you close a retirement account, you have four broad options:

  • You can transfer the account to another provider.
  • You can roll over the account to one with the same tax treatment.
  • You can convert the account to a Roth account.
  • You can close the account and withdraw the money for yourself.

Transfer an account elsewhere

If you want to close your retirement account and transfer it to another financial institution, you can do so without creating any taxes. This option is relatively easy, though you still need to be prepared.

You’d use this option in the following scenarios:

  • Moving a traditional IRA to a traditional IRA at another institution
  • Moving a Roth IRA to a Roth IRA at another institution
  • Moving a traditional 401(k) or a Roth 401(k) to another workplace retirement plan, perhaps a former employer’s plan or to a new employer’s plan.
  • Moving a traditional 403(b) or a Roth 403(b) to another workplace retirement plan, perhaps a former employer’s plan or to a new employer’s plan.

While it’s possible to mess up and generate a sizable tax bill, avoiding this outcome should be pretty easy.

Where you might create taxes: When done correctly, you shouldn’t generate taxes. But it’s worth double-checking that you’re moving your old account to the same type of account at the new provider, or you could inadvertently create a tax obligation.

Roll over an account with the same tax treatment

If you want to roll over an employer-sponsored retirement account to an IRA with the same type of tax treatment, then you may be able to do that without incurring taxes, too.

You’d use this option in the following scenarios:

  • Rolling over a traditional 401(k) or 403(b) account to a traditional IRA
  • Rolling over a Roth 401(k) or 403(b) account to a Roth IRA

Note that while you’re changing the account from an employer-sponsored plan to an IRA, the tax treatment is the same for both plans. For example, you can roll over a traditional 401(k) or 403(b) to a traditional IRA – all of which contain pre-tax money. Similarly, with Roth rollovers, which contain after-tax money and is then moved to a Roth IRA, which is after-tax.

However, it’s important to understand that many employer-matching funds in Roth 401(k) accounts are actually made with pre-tax money. So if you move any pre-tax funds from a Roth 401(k) into a Roth IRA, then you’ll generate taxes on this portion of the rollover balance.

Where you might create taxes: It’s vital to be sure that the new plan has the same tax treatment as the old plan (i.e., traditional plans go to traditional IRAs, and Roth plans go to Roth IRAs). Otherwise, if you move a traditional plan to a Roth plan, you’re likely to run up a tax bill. Employer matching funds made with pre-tax money rolling into a Roth IRA will create taxes.

Convert the account to a Roth account

If you want to close a traditional retirement account and convert it to a Roth IRA, then you’ll generate a tax bill.

You’d use this option in the following scenarios:

  • You close a traditional 401(k) and convert it to a Roth IRA.
  • You close a traditional 403(b) and convert it to a Roth IRA.
  • You close a traditional IRA and convert it to a Roth IRA.

In each of these cases, you’re moving from a pre-tax traditional account that includes untaxed money and converting it to an after-tax Roth IRA. So you’ll be required to pay taxes, and you’ll be taxed at ordinary income rates on the conversion. In fact, financial advisors recommend that investors convert their traditional retirement accounts over a period of time to minimize taxes.

Consider the best brokers for Roth IRAs as you’re looking to convert your retirement account.

Where you might create taxes: Converting money from a pre-tax plan to a Roth IRA will create a potential tax liability. This calculator figures how much a conversion might cost you.

Close the account and withdraw the money for yourself

If you simply close the account and withdraw the money to use for yourself, then you may owe taxes on it. But you can avoid taxes in a few situations.

You’d use this option in the following scenarios:

  • You close a traditional 401(k), traditional 403(b) or traditional IRA and withdraw the cash.
  • You close a Roth 401(k), Roth 403(b) or Roth IRA and withdraw the cash.

With the traditional accounts above, you’ll always owe taxes if you withdraw money or close the account. Your contributions to these accounts were never taxed, so the government wants its cut. That’s true regardless of your age when you withdraw the money. But if you’re younger than age 59 ½ and withdraw the money, the government may hit you with a 10 percent penalty, too.

However, the situation is a bit more complex with Roth retirement accounts and depends on your age, as well.

  • If you close a Roth IRA and withdraw the money, you’ll never owe taxes on your contributions, since you already paid taxes on them. However, you may owe taxes on the earnings if you withdraw them before age 59 ½ and you haven’t met the five-year rule from the year of your first Roth IRA contribution. If you’ve met the five-year rule and withdraw before age 59 ½, you may avoid taxes but still be hit with a 10 percent penalty.
  • If you close a Roth 401(k) or 403(b) and withdraw the money, you won’t owe taxes on your contributions, since you paid taxes on them already. But if you take out earnings before age 59 ½, you’ll be hit with taxes and maybe a bonus penalty, depending on whether you’re able to make hardship withdrawals from the account.

The rules are complex surrounding the exact conditions under which you can withdraw your money and avoid taxes on them. In some cases, you can avoid income taxes and the extra penalty, while in other cases you can avoid only one or the other.

Where you might create taxes: If you close a traditional account and spend the money, you will generate taxes and potentially an extra 10 percent penalty, depending on whether you meet a few conditions. For Roth accounts, you’ll be able to withdraw contributions without taxes, and you may even be able to dodge taxes if you meet a few conditions or are able to make hardship withdrawals from a 401(k), but don’t forget about the potential bonus penalty.

How to close your retirement accounts or move them

If you’re planning to close your retirement accounts and withdraw the money to spend, make sure that’s the correct strategy for you. Retirement experts routinely advise workers to keep their money invested and use the money for retirement. But if it’s the right course of action for you, then you’ll need to liquidate any investments and then have the plan provider send you a check.

If you want to close the account and move it to another provider, contact your old and new plan sponsors and follow their processes. Often they can process the request in a couple of weeks and then your money and investments, if applicable, will appear in the new account.

Finally, double-check that your new account is the right type. You don’t want to learn months later at tax time that you’ve created a tax liability by depositing the money in the wrong account.

Bottom line

Whether you owe taxes when closing a retirement account depends a lot on your purpose – whether you plan to spend it, transfer or roll it over to another account. It can be a complex process, and so it can be valuable to work with a financial advisor to make the right decision.