Investing in the stock market is a smart way to generate wealth, but it can also be daunting. The market is incredibly volatile at times, which is unnerving when your life savings are on the line.

Nobody knows when the market will crash, but it is certain that another downturn is coming eventually. Should you continue investing even during periods of volatility? Or are you better off waiting until the storm passes? Here's what you need to know.

Stock market crash with shadow of a bear in the background

Image source: Getty Images.

Stock market crashes: The bad and the good

The bad news about market crashes is that they're unpredictable. Even the experts can't always accurately predict when a crash will happen or how long it will last, so they can take investors by surprise.

This uncertainty can make it incredibly difficult to determine when is the right time to invest. In theory, it makes sense to pull your money out of the market right before a crash, then reinvest when stock prices are at rock bottom.

In the real world, though, buying and selling at the exact right moment is nearly impossible. Wait just a little too long to sell, and you could end up selling your investments at a discount after stock prices have plummeted. Then if you wait too long to buy and stock prices have rebounded, you'll be paying a premium for the same investments you recently sold.

For those reasons, you're better off holding your investments regardless of what the market does. The good news is that the market has always managed to recover from crashes. If you're patient and are investing in strong companies, your investments should bounce back, too.

Should you keep investing or press pause?

When a stock market crash does inevitably arrive, what should you do with your investments? Is it smarter to continue investing even when the market is in a free fall? Or should you wait until the market recovers?

While it may seem counterintuitive, investing during a market crash can be a very smart move.

When the market crashes, stock prices are lower. The more severe the crash, the more prices fall. While that may not seem like a good thing, it means you can buy quality stocks at significantly lower prices.

This doesn't mean you should load up on every stock you can get your hands on simply because they're cheaper. However, if you've had your eye on particular stocks but were hesitant to invest because of their high prices, a market crash could be a good opportunity to buy when they're on sale.

Before the market crashes, make a wish list of the stocks you'd like to buy if their prices drop. Do your research here, and make sure they're solid investments that you'd be willing to hold for several years or even decades. Then when the market takes a turn for the worse, you'll be ready to pounce on these stocks at bargain prices.

Making the most of a market crash

Stock market crashes can be intimidating, but they're normal and unavoidable. Instead of trying to time the market, focus on buying quality stocks that are likely to survive a crash. With this strategy, your portfolio will weather the storm and become even stronger.