A stock market crash is on the way. I'm convinced of it. What I'm unsure of, though, is when it will happen. Maybe the market will crater this week. Perhaps stocks will plunge next year. It's possible that a major downturn is several years in the future.

However, there's a near certainty that the market will tank sooner or later. Does this mean that all stocks will be radioactive when it happens? Not at all. Here are three great stocks to own during a stock market crash -- whenever the next one occurs.

Lighted arrow pointing up with four other arrows pointing down.

Image source: Getty Images.

Berkshire Hathaway

Some stocks go against the trend during major market downturns. Berkshire Hathaway (BRK.A -0.76%) (BRK.B -0.69%) usually isn't one of them. The stock fell nearly as much as the S&P 500 index did during the huge market sell-off of 2008-2009 and the COVID-19 meltdown in 2020.

So why is Berkshire a great stock to own during a market crash? For one thing, the company's main businesses, including insurance and railroads, tend to help its shares rebound strongly after a major economic downturn. We're seeing that happen so far this year, with Berkshire stock jumping nearly twice as much as the S&P.

However, I think there's an even better reason to own Berkshire Hathaway in the next stock market crash: Its ginormous cash stockpile. When the company announced its Q1 results earlier this month, it reported a cash position of $145.4 billion. 

Warren Buffett isn't likely to spend a lot of that cash on stocks that are trading at a premium. That means Berkshire will probably retain a large cash stockpile until the next time stocks go on a fire sale. Buffett and his lieutenants could back up the truck and load up on stocks in the next market crash. If they do, shareholders will likely reap the rewards for years afterward.

Dollar General

Dollar General (DG -0.41%) is one of those stocks that often perform well when the market is tanking. Sure, it fell last year when the COVID-19 pandemic first hit. However, the discount retailer's decline was a lot less than the major indexes. Dollar General's share price also snapped back quickly and then trounced the S&P 500 performance throughout the rest of 2020.

There's a reason why Dollar General frequently goes against the grain. Major market sell-offs are usually linked to negative economic news. When the economy goes south, consumers have to tighten their purse strings. That makes the everyday low prices at discount retailers like Dollar General more attractive than they'd normally be.

But what if the next market crash is a long way off? Will Dollar General flounder if the economy is good? Thankfully, the answer is a resounding "no." The retail stock more than doubled the returns of the S&P 500 during the five boom years leading up to 2020.

Granted, the reopening of the economy after the COVID-19 lockdowns could hurt Dollar General's year-over-year comparisons over the next few quarters. However, that will only be a reflection of how strong the company's business was last year. Dollar General plans to continue opening new stores and remodeling existing locations. Look for solid growth from the discount retailer for a long time to come. 

Viatris

We can't go back and look at how shares of Viatris (VTRS 0.87%) performed during previous stock market crashes. That's because the generic-drug maker wasn't a stand-alone entity until November 2020, when Pfizer (PFE 0.55%) merged its Upjohn unit with Mylan.

However, Viatris is on this list for one simple and straightforward reason: The pharma stock is so dirt cheap that it doesn't have much room to go lower. I'm not kidding. Viatris' shares currently trade at under 4.5 times expected earnings.

I don't expect Viatris will ever be a phenomenal growth story. There's a good chance, though, that it will be able to deliver respectable sales and earnings growth within the next few years as the company launches new products and achieves synergies from the Upjohn-Mylan merger.

What Viatris will be is a solid dividend stock. The company recently initiated a dividend program with a dividend yield of 2.9%. Generic drugs and biosimilars might not make for the most exciting business. During the next market crash, though, I predict that investors who own Viatris will be glad they did.