The short answer is: You can’t. Unless you’re inheriting the IRA from your deceased spouse, you aren’t able to convert an inherited IRA into a Roth IRA. But that doesn’t mean you’re out of options. Read on to learn what they are, or how you can convert the IRA if you are a spouse.

Can You Convert an Inherited IRA to a Roth IRA?

If you’re inheriting an IRA from someone who was not your spouse, you generally won’t be able to convert it into a Roth IRA. Depending on whether the person specifically designated you as a beneficiary, and barring a few exceptions, such as if you’re disabled or a minor, you’ll generally need to empty the inherited IRA account within five to 10 years.

What if I’m Inheriting My Spouse’s IRA?

If you’re inheriting the IRA from a spouse, however, the rules are different. In this case, the IRS offers two options. You can keep the inherited IRA in your spouse’s name, with yourself listed as the beneficiary, which requires you to take required minimum distributions (RMDs) that you will owe taxes on. Alternatively, the IRS allows you to treat the inherited IRA as your own by listing yourself as the account owner, then you can do anything with it that you’d normally be allowed to do—including converting it into a Roth IRA.

How To Convert Your Late Spouse’s IRA to a Roth

The rules for converting an inherited IRA from your spouse into your own Roth IRA are basically the same as any other Roth IRA conversion, with a few differences. Here’s how it will work:

Alternatives To Converting an Inherited IRA to a Roth IRA

If you inherited an IRA from someone who was not your spouse, your options depend on a few things, like whether the person who passed away specifically listed you as the beneficiary. You’ll fall into one of these three camps, with the following options:

You were specifically designated as the beneficiary: In this case, you’ll need to empty the IRA account that you inherited within 10 years. You’re a designated beneficiary, and you meet certain conditions: If you’re a disabled person or chronically ill, close in age to the person who passed (10 years difference or less), or a minor, you can take distributions from the inherited IRA over your remaining life expectancy. You inherited the IRA without being specifically named as a beneficiary: If a court decides you should inherit the IRA, your options depend on the original account owner. If the person who died already had started taking RMDs, you’ll get distributions according to their schedule. If not, you’ll need to empty the account within five years.

As you can see, you might be required to immediately start withdrawing the money from an IRA someone bequeathed to you, instead of when you retire. If you did that from your own IRA, you’d face a 10% early withdrawal penalty, but because this is a special case, that penalty is waived for inherited IRAs. However, you will need to include any withdrawals in your taxable income for that year and pay income taxes on it. So if you’re inheriting a large amount and you’re on a time limit, you can spread out the distributions to limit the tax impact. For example, if you inherit $1,000,000 as a designated beneficiary, you can withdraw $100,000 per year to limit having to pay taxes on 1 million dollars’ worth of income at once. Once you withdraw the money, you can do whatever you want with it—even move it into your own Roth IRA with normal contributions, as long as you qualify. You’ll still end up with more money in your Roth IRA; it just won’t be as efficient as converting the inherited IRA on its own. Want to read more content like this? Sign up for The Balance’s newsletter for daily insights, analysis, and financial tips, all delivered straight to your inbox every morning!