Two of the biggest healthcare stocks on the market in terms of market cap haven't delivered big returns for investors in recent years. Both Pfizer (NYSE:PFE) and Johnson & Johnson (NYSE:JNJ) have lagged well behind the S&P 500.

But the dynamics are changing for both companies. Which stock is likely to be the biggest winner for investors over the next decade? Here's how Pfizer and Johnson & Johnson stack up against each other.

Female scientist in a lab holding up two test tubes

Image source: Getty Images.

The case for Pfizer

Pfizer's about to be smaller -- and that could be the biggest reason to consider buying the stock. In July, the company announced plans to merge its Upjohn unit with Mylan. A few months later, Pfizer revealed that the name of the new company resulting from this merger will be Viatris. 

Probably the most important thing to know about this transaction is that it will leave Pfizer with a lineup of drugs that should generate solid growth for years to come. At the top of that list are breast cancer drug Ibrance and anticoagulant Eliquis, which market researcher EvaluatePharma projects will be the No. 3 best-selling drug in the world by 2025

The Pfizer that remains after the Viatris deal will also claim a handful of drugs that don't generate the level of sales that Ibrance and Eliquis do but are growing even faster than those two blockbusters. Sales are soaring for Pfizer's immunology drug Xeljanz, cancer drug Inlyta, and rare heart disease drug Vyndaqel.

Although Upjohn generates a lot of cash flow, the segment has been a drag on Pfizer's revenue and earnings growth. Declining sales from the loss of exclusivity of stars of the past such as Lyrica have been hard for the company to overcome. But with Upjohn splitting off to merge with Mylan, Pfizer anticipates that it will deliver revenue and adjusted earnings growth that ranks among the best in the pharmaceutical industry, at least through the middle of the next decade.

Pfizer will also be left with a promising pipeline. The company currently has 24 late-stage programs, and several of them target additional approved indications for already-approved drugs. But Pfizer also has several new late-stage candidates with significant potential, notably including its PF-06482077 pneumococcal vaccine, and experimental pain drug tanezumab.

The dividend will be the most visible casualty from the spinoff and merger of Upjohn. Pfizer will almost certainly have to cut its dividend without the cash flow that Upjohn generates.

However, investors don't need to be worried at all. Pfizer shareholders will own 57% of Viatris, which is expected to pay a solid dividend that, when combined with Pfizer's dividend, should give close to the current yield of 3.9%.

The case for Johnson & Johnson

Johnson & Johnson is more likely to grow even larger than it is now. You could make a strong argument that J&J's size is one of the most important reasons to buy the stock. 

The company's growth will almost certainly stem in part from acquisitions. J&J made two key deals this year to bolster its medical device segment, acquiring Auris Health in February and announcing plans earlier this month to buy out the Verb Surgical stake currently owned by Verily, which itself is owned by Alphabet.

But Johnson & Johnson should be able to deliver plenty of organic growth, as well. The company has more than 260 operating companies that compete in multiple areas organized into three business segments: consumer, medical devices, and pharmaceutical.

While all three of these segments make billions of dollars each year, the pharmaceutical unit is by far the most important for J&J's future. This segment brings in nearly half of the company's total revenue and is its fastest-growing business.

J&J claims several blockbuster drugs that are rising stars, including cancer drugs Darzalex and Imbruvica and immunology drugs Stelara and Tremfya. The company won Food and Drug Administration (FDA) approval earlier this year for another likely blockbuster -- depression drug Spravato. However, it also faces declining sales for its former top-selling drug Remicade.

Investors have liked Johnson & Johnson for decades for its dividend. The company is a Dividend King, with a sterling track record of 57 consecutive years of dividend increases. Its dividend currently yields 2.6%.

Better buy

I think that Johnson & Johnson is a solid dividend stock that's a good pick for income-oriented investors. The company does face quite a few issues, though, including an eroding moat. Still, I have no doubt that J&J will remain a stable healthcare leader for a long time to come.

But if I could pick only one of these two healthcare stocks, it would be Pfizer. For sure, Pfizer's higher yield is a major draw. However, I'm also optimistic that the company's Upjohn move will pay off over the long run and enable Pfizer to deliver solid growth.