Worried about a stock market crash? Read this

Stocks triple since 2009 low
Stocks triple since 2009 low

Many investors still can't shake the memory of the stock market crash of 2008.

Fearing a repeat, they've stayed on the sidelines by keeping their money in cash. They missed out on the great bull run of the past six years. Now that stocks are at all-time highs and look somewhat expensive, these investors are understandably even more scared to get back in.

But consider this: even if you have terrible timing and jump in right before a market crash, you would still recover your money relatively quickly.

For example, people who invested $1,000 in the S&P 500 at the beginning of 2008 and again at the start 2009 were back in positive territory by the end of 2009, according to a new analysis by financial technology firm CircleBlack.

Sure, they suffered steep losses (and likely lost some serious sleep) as stocks cratered during the financial crisis. Yet they also enjoyed a dramatic rebound in U.S. stocks as the system stabilized. The S&P 500 is up over 200% since the bottoming out in March 2009.

crash explanation

It's very hard to gauge the stock market peak, but it's equally hard to get the low point right. If you're going to take your money out of the market, you also have to know when to get back in.

Related: I turned a 'fake' $1M into $120M

Recovering from the Great Depression: Even those who bet on America right before the Great Depression would have made their money back eventually. CircleBlack said those who sank $1,000 in the S&P 500 at the start of 1929 and then put $1,000 in every year after (a common scenario for people putting money regularly into their retirement account) got back to breakeven within seven years.

That's obviously an extreme example. During less scary market meltdowns like in the 1970s, the recovery time was far less.

"These results suggest that for investors with a long time horizon, the downside of even a worst-case scenario isn't that dire," Adam Freedman, chief investment officer at CircleBlack, wrote in a recent report.

crash recovery bar

Related: 4 reasons small stocks could be studs in 2015

Cash holds risks too: It may be tempting to stay on the sidelines. However, holding too much cash for fear of a market crash "will almost certainly cause you to miss extended periods when markets perform well," Freedman wrote.

Just look at the past few years. The S&P 500 is up an impressive 50% since the end of 2012 alone.

Of course, it's important to note that this analysis isn't saying put all of your money in stocks. Investors have different risk levels and different time horizons -- young investors have decades to go, retirees probably don't.

For older investors, making their money back within a few years could be the difference between being able to retire or not.

Related: Why this tech party isn't like 1999

Timing the market is near impossible: Younger investors don't have that excuse, but it's hard to blame Millennials for fearing another crash. For many, it's almost all they know.

During the early 2000s, the Nasdaq crashed as the Dotcom bubble popped, taking the rest of the market down with it. Just eight years later, the Wall Street financial crisis fueled an even scarier plunge in stocks.

And at some point, the current bull market will end as well.

"Stocks are going to fall eventually, but there's no reliable way to predict when that will happen," said Freedman. "On net, it's better for you to actually stay in."

CNNMoney Sponsors