Imagine you're having a normal work day when all of a sudden you notice a notification on your phone that the stock market has plunged. Yikes! What do you do next? If you're like many people, you'll do one or more things that you should not do.

Here are three key things you should not do when the stock market crashes. Learn about them now so that you can avoid some potentially costly errors in the future.

Someone is looking at the camera with a serious expression.

Image source: Getty Images.

1. Don't panic

First off, don't do what many headlines seemingly want you to do -- panic. Remember that headline writers want as many people as possible clicking into their articles, so you're more likely to see a headline that says "Dow Plunges 600 points!" instead of, say, "Stock Market Down 1.7% Today." (By the way, both headlines reflect the same amount of decline; with the Dow recently near 34,000, a 600-point drop is a 1.7% one. Always focus on percentages, not points.)

It can help you not to panic if you focus on your long-term performance instead of having a short-term perspective. Yes, you might suddenly be underwater on a stock, but what matters most for long-term investors is how the company will be valued years from now. Typically, a stock market drop doesn't reflect shrunken growth potential for a company, so it's often best to just hang on. Selling when a stock is down is a surefire way to register a loss, or a smaller gain.

Don't focus on stock prices, either. Focus on value instead. So, for example, if you bought shares of a stock at $60 apiece, and they have dropped to $50, don't focus on the fact that you're down nearly 17%. Instead, think about what the company, and its stock, is really worth. If it's healthy (manageable debt, ample cash) and growing, adding new products and employees, building more factories and/or stores, then that's promising, and its stock is likely to be higher in the future.

2. Don't exit the stock market

Not being panicked can help you avoid another critical blunder: selling stocks simply because you're stressed out by the falling stock market. It might help to remember that the stock market simply does fall now and then, and occasionally it does so sharply or for a prolonged period. Despite every small or huge correction and crash in the past, though, it has always recovered and gone on to hit new highs.

For example, according to the Schwab Center for Financial Research, the stock market experiences a "correction" -- a drop between 10% and 20% -- about every other year. (That's based on the 20 years between 2001 and 2021.) But the stock market has recovered from most such drops fairly quickly: "Despite these pullbacks, however, stocks rose in most years, with positive returns in all but 3 years and an average gain of approximately 7%." Stock market analytics company Yardeni Research looked at data going back to 1950 and found that stock market corrections happened about every 1.9 years, with 32 of them lasting less than a year and 24 lasting less than four months.

Not selling in a panic is a great move when the stock market crashes, but even better is buying stocks, if you can. That's because a meaningful stock market drop will put the stocks of many great, growing companies on sale. You might prepare for this by maintaining a watch list of stocks you'd love to own at the right price. And perhaps keep a little cash on the side, ready for such opportunities. (Don't keep too much of your portfolio in cash, though. You don't want to be missing out on gains by waiting for what might be a long time.)

3. Don't take your eyes off the prize

Finally, keep your eyes on the prize -- the glorious, long-term growth of your portfolio. It will take disciplined, regular infusions of your money into shares of simple but powerful index funds and/or individual stocks. (Low-fee, great index funds can really be all you need to build long-term growth.)

It will also take time -- and a lot of it. Ideally, two or more decades. Over such a long period, there will definitely be times when the stock market soars and sinks, but in the long run, you'll likely see amazing gains. You'll need to keep calm during every downturn, though, and stick to your plan.

When the market has fallen is an especially powerful time to add more money to your portfolio, so don't stop. Don't obsess over your portfolio, either, checking it every day or every hour. Trust the process, and if you don't have confidence in it, read up on investing so that you develop confidence in your investing approach.

Stock market crashes and even recessions can be good for your long-term financial health if you approach them rationally.