After years of calmly rising, the stock market has hit a huge air pocket. Volatility has screamed higher as major market benchmarks such as the Dow Jones Industrial Average (DJINDICES:^DJI) have plunged, and longtime investors have seen the values of their portfolios shrink dramatically in just the past few weeks. Those who are fully invested have little choice but to ride out the downturn and wait for the inevitable recovery.

However, many people have had cash on the sidelines for a while now. They were dubious about the long period of stock market gains and concluded that stocks looked too expensive to buy. Now that they're a lot cheaper, the question many cash-rich investors have is whether they should take advantage of the downturn by buying stocks now, or wait to see if they can get in even cheaper.

Below, we'll look at how you can answer that question for yourself in a way that will help you reach your long-term goals while also acknowledging short-term reality.

Why deciding between now and later is difficult

Investors have to deal with two conflicting priorities when they're faced with a steep stock market decline. On one hand, the most important rule of managing your portfolio is to try never to lose money. Permanent losses of capital not only take away from your financial wellbeing, they also make you feel like a bad investor, which in turn can heighten your vulnerability to emotional decision-making. If you buy now and the stock market keeps falling, you can feel like a real idiot.

A binder labeled "invest," sitting on a table with a pair of glasses, a pen, and some charts

Image source: Getty Images.

On the other hand, the best long-term returns come from buying stocks of good companies when they've fallen significantly. Even if you don't catch the absolute bottom, your returns will still be a lot better if you invest now than they would've been if you'd bought at the top of the market.

One way to reconcile these two priorities is to look at how much money you expect to have for investing, both now and in the near future. That can help you plot the right course going forward.

If you have a little cash now but plan to keep earning more

Many people are able to save modest amounts regularly each paycheck. If you're one of them, it's smart to go ahead and invest what you have now, and then plan to invest similar amounts each pay period.

Most brokers, mutual fund companies, and other financial institutions will let you set up automatic investment plans to help you follow this strategy with minimum effort. You can have money moved over directly from your bank account right after you get paid, and from there, your financial provider can give you a range of choices that might let you put that cash straight into the investments you want. Whether it's a stock mutual fund, an index ETF like SPDR S&P 500 (NYSEMKT:SPY), or individual stocks of your choosing, automatic investment can get your money working for you as quickly as possible.

Letting cash accumulate for one big investment later is an option, but it often causes problems. It's easy to procrastinate when markets are turbulent, and emotionally, you're most likely to feel good about an investment after the markets recover -- which often won't be the most profitable time to invest.

If you already have a lot of cash ready right now

The more challenging question comes when you've already accumulated a lot of cash. Here, you'll see a difference between the textbook answer and the more practical choice.

Historically, you're better off, on average, investing a lump sum all at once. That makes sense generally, because the stock market tends to go up over time. Investing everything right now gets your money working for you as quickly as possible. So ,by that logic, you should go ahead and buy stocks now.

Again, though, it's important to be realistic. There's a very real chance that stocks will continue to fall. If you think you'll panic when you see confirmation that you've made what looks like a terrible decision in the short run, the smarter course is to anticipate that problem by breaking your cash into several pieces and investing one portion of your cash at a time. On average, your returns won't be as good. But if doing that stops you from making a costly mistake later, giving up a bit of your potential profit is worth it.

Make your plan

Whether you decide to buy stocks now or wait until later isn't as important as making the effort to figure out -- right now -- how you're going to handle your investing strategy going forward. By having a plan in place, you'll take emotion out of the picture and put yourself on a sustainable path toward long-term investing success.