They say all good things must come to an end, and that holds true for the stock market as well. After a rather impressive run, the market finally plunged into bear market territory on March 11, sending a large number of investors into full-blown panic.

Not familiar with a bear market? It's a period when stock values drop at least 20% from a recent high, and typically stay down for a while. Market corrections, by contrast, are drops of 10% or more, but they tend to be more short-lived.

So now that we're in a bear market, what happens next? How long will it take the stock market to recover? And what should you do as an investor to keep your cool -- and avoid losses -- during this turbulent time?

Bear in front of graph

IMAGE SOURCE: GETTY IMAGES.

What bear market recoveries look like

It's hard to predict how long a bear market will last, so here's a snapshot of what they've looked like in the past: Between 1926 and 2017, we've seen eight different bear markets, and those have lasted between six months and nearly three years. Perhaps the most notable of those was the bear market associated with the now-infamous 1929 stock market crash, which lasted 2.8 years and sent the S&P 500 plummeting by roughly 83%.

Our most recent bear market, meanwhile, occurred between 2007 and 2009 in conjunction with the Great Recession and lasted 1.3 years. During that time, the S&P 500 dropped about 51%.

Keep in mind that we actually teetered on the edge of a bear market in late 2018, too. But stock values came back up quickly, and 2019 closed out on a high.

So what's in store now? It's hard to say. Our recent downturn was unquestionably fueled by COVID-19, and we're currently in unchartered territory with regard to citywide shutdowns, school closures, and travel restrictions. COVID-19 is already taking a toll on the economy and creating intense hardships for small businesses in particular. Meanwhile, countless Americans risk going without pay for weeks or months in scenarios where they're forced to miss work due to a lack of child care, or they're non-essential personnel whose work can't be done remotely. All of this will no doubt impact spending in the coming weeks and months, and because we don't know how long things will remain status quo, it's hard to see a light at the end of the tunnel.

One thing we can take solace in, however, is that the U.S. economy and stock market were fairly strong prior to COVID-19, so there's hope that once this health crisis starts to cool down, things could recover fairly quickly. Furthermore, there's no reason to assume that our current bear market situation will spur a full-blown recession -- though we can't discount that possibility, either.

What to do during a bear market

Since we can't predict how long the latest bear market will last, it begs the question: What should you, as an investor, do? If you're tempted to sell off a bunch of stocks to cut your losses, don't. If you sell now, the only thing you'll do is lock in those losses, which won't help you. On the other hand, if you have cash on hand to invest, now's actually a good time to buy up quality stocks on the cheap. But don't invest money you expect to need within the next seven years -- that's a generally good rule to follow with stock investing, and a particularly good rule in today's environment.

It's easy to get discouraged as an investor when a bear market hits, but remember this: The stock market has a strong history of recovering from downturns, and if you buy stocks now that you plan to hold for the long haul, there's a very good chance you'll come out ahead.