When you consider the fact that we haven't had a major market correction in more than six years, and that the Dow Jones has dropped by about 600 points over the last few weeks, it's only natural to be somewhat apprehensive about putting money into the stock market right now. And, while a stock market crash or correction is a realistic possibility in the coming months and years, it is no reason to stay on the sidelines. In fact, from a long-term perspective, market crashes are nothing but a bump in the road, and can actually create some nice buying opportunities.

What if I invest now and the market crashes tomorrow?

Good question. If you are a short-term trader or might need to cash out your investments soon, a market crash tomorrow would be catastrophic. However, from a long-term perspective, crashes matter less than you might think.

Consider these three points in time:

The market peak in 2007, before the financial crisis started The peak of the dot-com bubble The day before "black Monday" in 1987

These are arguably the three worst possible times you could have chosen to make an investment over the past 30 years. So, let's see what would have happened if you had been unfortunate enough to get in right before a crash.

Starting with the most recent one, the S&P 500 peaked at 1,563 in October 2007, and proceeded to plummet over the next couple of years, bottoming at 678 in March 2009. If you had thrown all of your money into S&P 500 index funds in October 2007 and reinvested all of your dividends (which you should be doing anyway), you would be sitting on a 55% total return today. I realize that an annualized return of about 6% isn't fantastic, but I'll bet its more than you expected from a worst-case scenario.

Next is the dot-com bubble.

In this case, the S&P peaked at about 1,525 in March 2000, and once the bubble burst, it bottomed near 775 in October 2002. Even so, by investing at the pre-crash peak, you'd have an 80.3% total return today. Even an investment in the tech-heavy NASDAQ at the peak of the bubble would have produced a positive total return between then and now.

Finally, perhaps the most inopportune time to have invested in recent history is on October 13, 1987. This isn't exactly the day before Black Monday, but over the next few days, the S&P lost nearly 29% of its value. And, bear in mind that an investment made on this date would have gone through three market crashes between then and now.

Even so, over the nearly 28 years between then and now, you would be sitting on a total return of 1,300%, which translates to a 9.5% annualized average.

The point here is that over the long run, you're still likely to be better off buying stocks than any other asset class -- even if you buy at the absolute worst possible time.

Dollar-cost averaging can turn crashes into opportunities

One investing strategy that can be an effective way to take advantage of crashes and corrections is known as dollar-cost averaging. This refers to investing equal dollar amounts at predetermined time intervals.

Mathematically, you'll always end up accumulating stocks at a below-average price when you use this method. Let's consider a simplified example to see how this works.

Let's say that you want to invest in a certain stock, and that you decide to invest $1,000 every three months in order to build up a position in it over time. At the time you make your initial investment, the stock is trading for $50 per share, so your $1,000 buys 20 shares. After three months, the price has fallen to $40, so your next $1,000 buys 25 shares. And finally, after another three months has passed, the price has risen back to $50, so your next investment buys another 20 shares.

Investment Amount Share Price Number of Shares 1 $1,000 $50 20 2 $1,000 $40 25 3 $1,000 $50 20 Total $3,000 $46.15 65

So, you've acquired 65 shares at a cost of $3,000. If you calculate the average share price when you made your three investments, you'll come up with $46.67. But because dollar-cost averaging allows you to buy more shares at cheaper prices, your average cost per share is $46.15. This isn't an enormous difference, but you'll almost always come out ahead when you average into a position, and this can be a great way to accumulate more shares in the event of a market crash.

Invest early and often, and you'll end up a winner

The best ways to counteract the effects of a market crash are to give yourself a long time frame to ride out the bumps in the road, and to invest often in order to average into your investments. If you do this, you'll accumulate stock positions at good prices no matter what the market is doing, and you'll be well-positioned to capitalize as the market continues up over time. If you invest with a long-term mentality, a crash should be no more than a fantastic buying opportunity to add to your investments.