If you've taken a look at Pfizer (PFE -3.27%) or Johnson & Johnson (JNJ -1.17%) recently, you've probably noticed both companies have been reporting stagnant revenue growth that doesn't jibe with their stock prices. Despite flattening top lines, both of these drugmakers have beaten the benchmark S&P 500 index over the past year and investors want to know which can keep climbing the furthest.

Something's happening beneath the top lines at these pharma giants to keep investors interested. Let's dip below the surface to figure out which is the best stock to buy now.

Guys in suits playing tug-of-war.

Image source: Getty Images.

The case for Pfizer

In 2018, Pfizer recorded more prescription drug sales than any other company on the planet, which means it has a lot of pieces moving in different directions. One of the behemoth's top-selling products at the moment, the nerve pain reliever Lyrica, is about to head south thanks to a recent loss of exclusivity in the U.S. market where the drug produced $3.6 billion in sales last year.

Pfizer's product line is so large that U.S. Lyrica sales comprised just 6.7% of total revenue in 2018. By this time next year, generic competition for Lyrica will probably reduce U.S sales of the branded version by more than half. That will create some near-term headwinds, but the company's late-stage pipeline looks prepared to pick up the slack. 

At the end of April, Pfizer had 23 drugs in phase 3 trials plus 10 more under review. One of these, Vyndaqel, earned approval in May to treat patients with a rare life-threatening disorder that could lead to blockbuster sales.

Pfizer's vascular endothelial growth factor (VEGF) inhibitor, Inlyta has languished as a treatment for relapsed kidney cancer patients, but it's about to become Pfizer's next blockbuster as part of a combination treatment for those newly diagnosed. The combination reduced the risk of death 47% compared to Sutent, the standard treatment for these patients.

Pfizer's highly profitable operations generated $13.2 billion in free cash flow over the past year, which allows it to make bolt-on acquisitions that are too big for most drugmakers. For example, the recently announced $11.4 billion acquisition of Array Biopharma (ARRY) will complement the company's oncology presence with highly targeted treatments that can fit in a pill bottle.

Doctor holding a lightbulb.

Image source: Getty Images.

The case for Johnson & Johnson

Pharmaceuticals comprise a majority of Johnson & Johnson's total revenue, and the successful segment has been pulling its medical devices and consumer goods divisions uphill. Thanks to a successful study with the Monarch Platform, the medical device segment could be a big contributor soon.

Lung cancer claims the lives of more Americans than any other malignancy. There is a slew of recently approved treatments that are highly effective at treating patients with genetically defined tumors, but many patients never have their tumors examined because it can be an extremely dangerous procedure. The Monarch Platform is a tiny robotic-assisted camera and syringe that can reach tumors embedded in lung tissue and safely retrieve samples.

Johnson & Johnson reported first-quarter U.S. pharmaceutical sales that grew 4.3% year to year, and international sales soared 12.2%, or 3.9% after adjusting for currency changes. Zytiga, a prostate cancer treatment, and Remicade, an anti-inflammation injection, racked up a combined $8.7 billion in sales in 2018, which worked out to more than one-fifth of the entire pharmaceutical segment's sales for the year.

Johnson & Johnson has been able to offset the loss of exclusivity for some of its top-selling drugs with more recently launched cancer drugs. First quarter sales of Imbruvica, an oral treatment for the most common form of leukemia, rose 34% compared to a year earlier to reach an annualized $3.1 billion. Sales Darzalex soared to an annualized #% thanks to recent label expansions that made it part of a first-line multiple myeloma regimen.

Successful retiree counting his money.

Image source: Getty Images.

In the numbers

Since 2015, Johnson & Johnson's operations have generated even more free cash flow than Pfizer's. At $18.5 billion over the past year, there's plenty of cash to pursue bolt-on acquisitions, such as the one that provided the Monarch Platform and return heaps to shareholders at the same time.

A diverse stable of businesses has helped J&J become synonymous with reliable profit growth. Pfizer's been able to raise its payout faster than J&J over the past decade, but J&J's consistency has allowed it to provide a much higher total return on a longer time frame.

You may remember that Pfizer tried plugging the hole that Lipitor's patent expiration left with giant mergers that didn't work out as well as hoped. As a result, J&J shares have soared 379% over the past 20 years while Pfizer has underperformed the market with a gain of just 123% over the same span.

The better buy

While the healthcare conglomerate might turn out to be the best stock to hold for the next twenty years all over again, it's important to remember that J&J is 286% larger now than it was in 1999. Pfizer isn't exactly small, but it probably has a better chance to outperform for your portfolio in the years ahead.

To top it off, Pfizer's dividend offers a 3.3% yield, which is significantly better than the 2.7% yield you'd receive from J&J. Put it together and Pfizer looks like the better stock to buy right now.