The coronavirus pandemic has wreaked havoc on millions of Americans' lives, and it's also thrown a wrench into many older workers' retirement plans.

The stock market has taken a major tumble over the last few months, with the Dow and S&P 500 experiencing one of the worst first quarters in U.S. history. As a result, many soon-to-be retirees have watched their retirement savings evaporate before their eyes.

Because the stock market is so volatile right now, it's tough to say exactly how long this rough patch will last. If you're close to retirement age, that can make it difficult to gauge whether you should retire now or try to wait it out. There are a few things to keep in mind, though, as you're deciding whether or not it's safe to retire.

Mature couple looking at documents and a calculator.

Image source: Getty Images

The potential risks of retiring during a recession

It's likely the country is headed toward a full-blown recession, and it can be risky to retire during a stock market downturn.

When the market is down, stock prices fall as well. This can make it a good time to invest, because you're able to buy when the market is on sale and then sell later once stock prices bounce back. In other words, you have the opportunity to buy low and sell high. However, this also makes it a less-than-ideal time to sell your investments. You've likely been contributing to your retirement fund for decades, investing when stock prices were higher. If you withdraw your money now, you're essentially buying high and selling low.

It may seem as if you've already lost money if you've watched your retirement savings shrink over the last couple of months, but keep in mind that you can't technically lose money until you sell your investments. So even if your investments have fallen drastically, you can potentially recoup this cash by leaving your money invested for a few more years as the market recovers. If you withdraw your money now, you're only locking in your losses.

For these reasons, it might be wise to hold off on retiring for another year or two. Nobody knows exactly how long this recession will last, but if you can wait at least a little while until the market is in better shape, your investments will be worth more when you decide to retire.

Who should consider retiring now?

While in general it's best to avoid retiring during a recession, there are some instances where it may not be a bad idea.

For example, if you have loads of cash in your retirement fund, you may still be able to afford to retire even during tough economic times. If your portfolio is heavily weighted toward conservative investments like bonds and less toward stocks, your savings may not have taken a significant hit when the market took a turn for the worse. So as long as you withdraw your money wisely and don't spend more than you need to, you might be able to afford retirement right now.

In addition, if you have other sources of income that can help you pay the bills, you may be able to rely less on your savings. For instance, if you have a pension and will be collecting Social Security benefits, you might depend heavily on these sources of income for the first few years of retirement, so your investments have more time to recover. Then once the market bounces back, you can start withdrawing more from your savings.

Nobody is certain what the future will look like amid the COVID-19 pandemic, so flexibility is key when preparing for retirement. In general, it's a good idea to consider postponing retirement until the market is more stable. But if your finances are in good shape and you have enough income to live comfortably without relying too much on your savings, retirement might be within reach.