The S&P 500 has officially fallen into a bear market, and some of the most popular U.S. stocks have now lost 50%, 70%, or even more from their recent peaks. This decline came quickly and unexpectedly, and other than energy, has spared very little of the market.

It's perfectly natural if you're asking, "Should I even be investing right now?" And while the answer is generally yes, there's more to consider.

Man in front of laptop with worried expression.

Image source: Getty Images.

Should you really be investing in the stock market right now?

The short answer is yes. With the overall market about 20% off its recent high, long-term investors should absolutely continue to incrementally invest over time.

If you look at 20-year time periods, the stock market has always ended higher than it started. And historically speaking, it's been a great time to invest after the S&P declines by 20%, even if it ends up declining even more.

Consider this example. The financial crisis and Great Recession of 2007-09 was one of the worst bear markets in history, with the S&P 500 dropping by as much as 55% from its previous highs by March 2009. But let's say that you decided to invest in an S&P 500 index fund when it first entered bear market territory and dropped 20%, which occurred in July 2008.

If you had invested $10,000 at that time, you would have seen the value of your investment decline to about $5,500 over the next nine months or so until the market bottomed. But how would you be doing today?

You might be surprised to learn that even though the market fell more after you bought, your investment would be worth more than $41,500 today -- and that's after the recent market slump. That's an annualized return of nearly 11%. As I said, buying when the market has declined by 20% from the highs is a great entry point for long-term investors.

^SPXTR Chart

^SPXTR data by YCharts

A few caveats

As mentioned earlier, the answer isn't always a resounding "yes," especially when it comes to investing new money in a turbulent market.

For one thing, it's generally a good idea to keep any money you'll need within the next five years out of the stock market. To be sure, every bear market in history has come back to reach new all-time highs, but the length of time it has taken varies dramatically.

There's also your own mental health to take into consideration. If putting your hard-earned money to work in a market behaving like this will make you sleep less soundly and cause you lots of stress, it can be a good idea to pause new investments.

Finally, it's also worth considering what you're investing in. An investment in an S&P 500 index fund is one thing. An investment in an unprofitable software-as-a-service business is something else entirely. With such a large spectrum of risk in the market, this is definitely worth considering. Broad market index funds and high-quality blue-chip companies have historically been great places to invest after a 20% market plunge.

Final thoughts on bear market investing

As a final thought, it's important to acknowledge that the market certainly could go down from here. If inflation gets even higher, or the U.S. economy falls into a deeper recession than expected, we could see another leg downward.

However, one of the worst mistakes you can make right now is selling stocks (especially if their businesses are performing well) into this market weakness. If you don't want to invest new money, fine, but panic-selling is almost always a mistake from a long-term perspective. It's totally understandable to be tempted -- after all, it's common knowledge that the goal of investing is to buy low and sell high, but human nature is to flee to safety "before things get any worse."

Think of it this way -- if you were shopping in your favorite store, and they announced that everything would suddenly be 30% cheaper, how would you react? Would you empty your shopping cart and run out the door? The same logic applies here.