We've all heard the advice to hold through periods of volatility. As Warren Buffett famously said, "all there is to investing is picking good stocks at good times and staying with them as long as they remain good companies."

Yet when an investor endures month after month of watching their portfolio go down, heeding that advice becomes easier said than done.

If you're like me, then you're a visual learner who appreciates the power of factual charts. And with the S&P 500 in a bear market, investors are probably looking for reasons why they should be patient and let time work in their favor. Here is a visual guide that illustrates the power of holding through market cycles that can help you stay on track to meet your long-term financial goals.

A person with their back turned looking out over an open dirt road at sunrise.

Image source: Getty Images.

How long has it taken for the S&P 500 to make a new all-time high?

If you've been investing for a while, chances are you've heard that buying at the market top before a bear market has historically produced a positive return over time. Put another way, if you bought at the worst possible time right before the financial crisis or the dot-com bust in the early 2000s, you would still have made money if you were patient and didn't sell.

It's good information, but the better question is asking how long the S&P 500 has gone without making a new all-time high.

In the last 70 years, the S&P 500 has never gone eight years without making a new all-time high. Meaning that even if you bought at the worst possible time in a market cycle, you would have to wait less than eight years to break even.

^SPX Chart

^SPX data by YCharts

The above logarithmic scale chart shows a little over 70 years of S&P 500 returns with new daily all-time highs in orange. The grey vertical rectangles show U.S. recessions.

By just glancing at the chart, it's clear to see the long-term gains of the S&P 500 are excellent -- around 8% on average per year. You'll also notice that the orange line flatlines in the 1970s and the 2000s. Let's zoom into those periods.

Market lulls

There are a couple of periods in which it took about seven and a half years to return to record levels. One ran from January 1973 until July 1980:

^SPX Chart

^SPX data by YCharts

Similarly, the dot-com bubble burst crushed the market beginning in 2000. It took until October 2007 for the S&P 500 to reach a new all-time high.

^SPX Chart

^SPX data by YCharts

However, that high was short-lived, and after that, it took another four and a half years for the S&P 500 to reach record levels again.

^SPX Chart

^SPX data by YCharts

The silver lining

Some readers may think that we are in for another seven-year market lull. And we very well could be. But a silver lining from past multi-year sideways markets is that the years that follow tend to produce extraordinary returns.

In the seven-year period from 1980 to the end of 1986 (which included two recessions), the S&P 500 produced a 124% return.

And from 2013 to the end of 2019, the S&P 500 produced a 163% return.

In sum, even during the worst market downturns, the S&P 500 tends to make a new all-time high in less than eight years and then produces above-average results in the following years.

Patience is essential

No one knows how long the bear market will last or how many months or years it will take for the S&P 500 to reach a new all-time high. But what we do know is that the worst market periods don't last too long in the grand scheme of things.

It's much easier for an investor to be patient if they are only investing what they don't need anytime soon. Hopefully, by now, you have a better idea of what have historically been worst-case scenarios in the market and can take solace knowing that those worst-case scenarios really aren't too bad after all.