When you're hit by a surprise expense or you lose your job, you can only stretch your emergency fund so far. The reality is that in a true crisis, your options are often less than ideal. That may mean you have to turn to your Roth IRA for non-retirement reasons.

A Roth IRA is an individual retirement account that you fund with after-tax dollars. You can then withdraw the money 100% tax-free once you're age 59 1/2 and you've had the account for at least five years.

No matter how old you are or how recently you opened your Roth IRA, you can withdraw your contributions any time without paying taxes or penalties. But the withdrawal rules for your earnings are different. Tap them early, and you'll owe income taxes plus a 10% penalty.

If you're thinking of withdrawing money from your Roth IRA to survive an emergency, here are three ways to mitigate the damage.

A mature man sits in front of his computer, appearing frustrated.

Image source: Getty Images.

1. Only withdraw your contributions

This is the easiest (and the most obvious) solution: Limit your withdrawal to the amount you've contributed, and you won't pay taxes or a penalty. When you take money out of your Roth IRA, the IRS automatically considers it to be a withdrawal of your contributions. Only when you withdraw more than you've contributed do you have to worry about the taxes and penalty.

But that doesn't mean you should take your contributions without seriously considering the alternatives. That's money that won't have time to compound and be a source of income for you in your retirement years.

If you've only had your Roth IRA for a couple of years, your account probably still consists mostly of your contributions. Limiting your withdrawal to your contributions could still drain most of your retirement savings.

2. Use the 60-day rollover rule to your advantage

Technically, you can't borrow from your Roth IRA. Even when you limit your withdrawal to your contributions, if you've maxed out your Roth IRA contributions for the tax year, you can't put money back in until next year -- though there is an exception: If you withdraw Roth IRA money, you can put it back, so long as you do so within 60 days

Under the IRA rollover rules, you can take money out of a retirement plan without incurring taxes or a penalty, as long as you redeposit it to the same account or another qualified retirement plan within 60 days. Usually, rollovers happen because you change jobs and you don't touch the money. For example, if you leave your job, you may roll over your 401(k) into an IRA

Just be aware of the consequences for failing to repay your Roth IRA: The contributions you withdraw will still be tax- and penalty-free, of course, but the IRS will treat any earnings you withdraw as an early distribution -- which means you'll pay a 10% penalty on top of taxes. 

Because this option is so risky, it's best avoided unless you're facing a short-term cash crunch and you're certain you can replenish your Roth IRA within 60 days.

3. Take a CARES Act withdrawal

If your finances have been affected by COVID-19 -- because you or a family member contracted the virus or you lost your job or income -- you're probably eligible for a penalty-free CARES Act withdrawal. The CARES Act rules also apply if your spouse lost their job or income.

The CARES Act waives the 10% penalty on early retirement account withdrawals of up to $100,000 through Dec. 30. You'll still owe income taxes on the Roth IRA earnings you withdraw if you're under age 59 1/2, but you can spread the taxes over three years. Ordinarily, you'd owe the entire bill when you file your taxes for the year.

This means if you took a $15,000 distribution under the CARES Act, you have the option of counting $5,000 as income each year in 2020, 2021 and 2022. 

While you can take out up to $100,000, you should limit your withdrawal to the minimum you need to survive. This is your retirement money we're talking about. If the distribution you take isn't enough to get you through a rough patch, you can withdraw additional money from your retirement accounts, so long as the total doesn't exceed $100,000.

You're allowed to repay coronavirus-related Roth IRA withdrawals, as long as you do so within three years. It won't count against your contribution limits. You can even file amended tax returns so that you aren't taxed on the distribution. So if you split the income tax bill over three years but then repaid the distribution in full in 2022, you'd file amended returns for 2020 and 2021 to get a refund on the taxes you paid.

Should you use your Roth IRA in an emergency?

Your Roth IRA shouldn't double as your emergency fund. But if you're out of savings, it's certainly a better option than a payday loan or cash advance

If you do opt to take Roth IRA money in an emergency, take the bare minimum you need to survive, and limit yourself to your contributions, if you can. Once you're back on track, focus on building a rainy-day fund that you can turn to instead of your retirement savings.