The stock market has experienced a whirlwind of a year, with the S&P 500 soaring nearly 50% over the past 12 months.

However, some investors worry this upward trend can't last much longer and that we're due for a market correction soon. While it's impossible to know exactly how the market will perform in the future, it's safe to assume stock prices will fall eventually.

When -- not if -- the market experiences a downturn, it's important to be prepared. Although no stock is immune to market volatility, there is one type of investment that's almost guaranteed to survive even the worst market crashes.

Green bull and red bear facing each other

Image source: Getty Images.

Preparing for a market crash

Stock market crashes are inevitable, so your investments are bound to take a hit at some point. Also, timing the market to try to avoid market downturns is incredibly risky, and it's a strategy that's almost impossible to pull off successfully.

Since nobody can escape market crashes, the best thing you can do is choose investments that have a good chance of recovering from downturns.

This can be challenging, and it requires a lot of research to determine whether a company's fundamentals are strong enough to withstand market turbulence. And even then, there's never a guarantee that any stock will survive a market crash.

Choosing the right investment

One type of investment that is more likely to survive market volatility, however, is the S&P 500 index fund. The S&P 500 is a stock market index that represents the market as a whole, and it was established in 1957. Although it's not immune to downturns, it does have an incredible track record in that it's survived every single correction and crash it's ever experienced.

In the last couple of decades alone, the S&P 500 has seen the dot-com bubble burst, the Great Recession, political and civil unrest, terrorist attacks and wars, and a global pandemic. But despite it all, it has earned positive returns over time.

^SPX Chart

By investing in S&P 500 index funds, it's extremely likely you'll earn positive returns over the long run -- even if the market does crash in the relatively near future.

There are never any guarantees in the investing world, but S&P 500 index funds are one of the safest types of investments out there. You will see your investments falter during periods of volatility, but there's a very good chance they will recover eventually.

How much can you earn with S&P 500 index funds?

Although S&P 500 index funds are relatively safe investments, you can make a significant amount of money if you're patient. They do need a lot of time to see substantial returns, but it's worth the wait.

Since its inception, the S&P 500 has earned an average rate of return of around 10% per year. Let's say you're just starting to invest, and you're investing $300 per month in S&P 500 index funds. If you're earning a 10% annual rate of return, here's approximately how much you'd accumulate over time:

Number of Years Total Savings
5 $22,000
10 $57,000
20 $206,000
30 $592,000
40 $1,593,000

Source: Author's calculations

Given enough time, it's possible to become a millionaire by investing in S&P 500 index funds. The key is to start saving early and save as consistently as possible.

Ready to get started?

Investing in S&P 500 index funds is a wise choice for many investors, and you have a variety of investments to choose from, including:

All of these funds track the S&P 500, and they all charge low fees as well. This makes any one of them a solid investment.

Market crashes are inevitable, so it's best to be prepared. By investing in S&P 500 index funds, you can rest easier knowing your investments are safer.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.