Yes, the stock market is going to crash. It's inevitable. We just don't know by how much.

More importantly, we don't know exactly when it will happen. It could be this month, later this year, or several years from now.

But there is something that you can know, even with this uncertainty. Planning now for what actions you'll take when a major market plunge occurs is smart.

One of the best things you can do during a significant downturn is to buy strong dividend stocks. They tend to hold up better when the market goes south. You'll also receive some income along the way. Here are three dividend stocks to buy if the market crashes.

A person with a concerned expression looking at a laptop.

Image source: Getty Images.

1. Viatris

I think that Viatris (VTRS -1.50%) ranks as one of the best dividend stocks to scoop up in a market meltdown for three key reasons. First, it's super cheap. Second, its business is resilient. And third, Viatris already has an attractive dividend.

The pharmaceutical stock trades at less than 3.4 times expected earnings and roughly 4.6 times free cash flow. I don't see Viatris' share price becoming much cheaper than it already is. This gives the stock a cushion that should prevent it from falling nearly as much in a stock market crash as most stocks would.

Viatris markets biosimilars and generic drugs around the world. While its business might not seem exciting, it's dependable. People need their medications, regardless of what the stock market does. The company also has several growth drivers on the way, with several pipeline candidates awaiting regulatory approvals.

Finally, many investors will like Viatris' dividend yield of 3.15%. The company recently increased its dividend payout by 9%. Look for more dividend hikes in the future. 

2. Pfizer

Those same three appealing characteristics for Viatris also apply to Pfizer (PFE -0.21%). That's not surprising, considering that Viatris was formed through a combination of Pfizer's Upjohn unit and generic-drugmaker Mylan.

Pfizer isn't nearly as cheap as Viatris. However, shares of the big drugmaker trade at only 11 times expected earnings. This level is well below the average forward earnings multiple for the S&P 500 and for big-pharmaceutical stocks, in general.

There are some questions about how Pfizer's COVID-19 vaccine sales will hold up once the pandemic ends. But Pfizer should continue to generate strong revenue and earnings for years to come, thanks to its broad product lineup and large pipeline. The company's pending acquisition of Arena Pharmaceuticals will give Pfizer additional promising autoimmune-disease candidates.

Pfizer also offers a dividend that yields just under 3%. The yield would be even higher if the pharma stock hadn't gained nearly 50% over the last 12 months.

If the stock market crashes, Pfizer's shares would likely fall somewhat, too. However, investors would then be able to lock in an even higher yield. And I suspect that Pfizer would rebound quickly.

3. Walmart

Walmart (WMT 0.18%) doesn't check off all of the boxes that Viatris and Pfizer do. Its shares aren't cheap, with a forward earnings multiple of 21. The retail-giant's dividend yield of around 1.54% isn't especially attractive, but Walmart scores big time when it comes to the resilience of its business.

My Motley Fool colleague Bradley Guichard recently named Walmart as one of the top dividend stocks that "will hold up no matter the market conditions." I agree with that take 100%.

What are the main reasons why the stock market might fall? I'd put a struggling economy, a worsening pandemic, or a geopolitical crisis at the top of the list of possibilities. Consumers would almost certainly keep shopping at Walmart as much as they do now (and perhaps even more) in any of these scenarios.

Sure, Walmart's dividend yield isn't as juicy as many investors might prefer. However, you won't have to worry about the dividend for even one second if the market crashes.

During the huge stock sell-off in 2020, Walmart's shares didn't drop nearly as much as the major indexes. The stock also bounced back more quickly. I expect a similar performance whenever the stock market plunges again.