Two of the biggest pharmaceutical companies in the world compete against each other on multiple fronts. Eli Lilly and Company (NYSE:LLY) and Johnson & Johnson (NYSE:JNJ) battle for market share in diabetes, immunology, and other areas. 

Which of these two drugmakers is more likely to win in another market -- the stock market? Johnson & Johnson has enjoyed a clear advantage in recent years. Investors really need to know, though, how well each company is positioned for the future. Here's how Lilly and J&J compare.

A female scientist looking through microscope and another scientists holding a dropper

Image source: Getty Images.

The case for Eli Lilly

Eli Lilly struggled over the last several years to generate revenue growth. However, CEO Dave Ricks stated at a major healthcare conference earlier this year that the company is on track to hit its goal of 5% average annual revenue growth through 2020. Lilly exceeded that target in 2017, with year-over-year sales jumping 8%.

There are three big reasons behind Lilly's resurgence. Diabetes drug Trulicity has proven to be a huge winner for the company, with 2017 sales of over $2 billion. That's more than double the drug's sales in the previous year. Lilly's osteoporosis drug Forteo is another blockbuster success story. And the newest rising star in the company's lineup, psoriasis and psoriatic arthritis drug Taltz, appears to be well on its way to reaching the $1 billion sale mark.

Lilly also claims several other products that are contributing to its growth. Cancer drug Cyramza and diabetes drug Trajenta saw double-digit percentage sales increases last year. Sales for another diabetes drug, Jardiance, jumped 122% in 2017.

More promising new products could be on the way, especially in treating pain. Lilly hopes to win FDA approval this year for migraine drug galcanezumab. Another migraine drug, lasmiditan, which Lilly picked up with its 2017 acquisition of Colucid Pharmaceuticals, is in late-stage clinical studies. Lilly and Pfizer are co-developing tanezumab, which is in late-stage studies targeting cancer pain, chronic lower back pain, and osteoarthritic pain.

Look for Lilly to fuel more growth through acquisitions of clinical-stage biotechs and assets as well as partnerships. The company could have more money to fund such deals in the not-too-distant future, with a decision on potentially selling or spinning off animal health unit Elanco expected within a few months.

Investors will get paid nicely while they wait for Lilly's newer products to generate additional growth. The company pays a dividend, which currently yields an attractive 2.85%. 

The case for Johnson & Johnson

Johnson & Johnson hasn't allowed competition for its top-selling drug Remicade and blockbuster diabetes drug Invokana plus sluggishness in consumer healthcare sales to get in the way of growth. Last year, J&J's overall revenue increased 6.3% thanks largely to its pharmaceutical business.

Autoimmune disease drug Stelara enjoyed a great year in 2017, with strong sales growth. Cancer drug Imbruvica, which J&J co-markets with AbbVie, turned in an even better performance. Johnson & Johnson also has a fast-growing multiple myeloma drug with Darzalex. 

Joaquin Duato, J&J's executive vice president and worldwide chairman of its pharmaceuticals segment, said earlier this year that the company intends to continue growing its pharma business in several ways. J&J hopes to expand its presence in the immunology market by launching new drugs like Tremfya, which could reach peak annual sales of close to $1.6 billion. Duato also stated that adding new indications for existing drugs, including Darzalex, was key to J&J's growth strategy.

Acquisitions have also been an important source of Johnson & Johnson's growth and should be in the future as well. J&J made a couple of especially significant acquisitions last year. In February, the company's medical device segment bought Abbott Lab's medical optics business. J&J acquired Actelion in the second quarter, picking up the Swiss drugmaker's pulmonary hypertension franchise. 

One of the most appealing things about Johnson & Johnson is its strong cash flow. Over the last 12 months, the company generated free cash flow totaling more than $17.5 billion. With that much cash coming in the door, the healthcare giant has lots of ways to reward shareholders.

Of course, one of the ways J&J uses its strong cash flow that investors especially like is that it's paying a solid dividend. The dividend currently yields 2.57%. Johnson & Johnson has increased its quarterly dividend payment for 55 consecutive years, making the stock a longtime favorite for income-seeking investors. 

Better buy

Lilly's prospects appear to be improving. However, I think Johnson & Johnson is the better stock to buy.

J&J isn't without its challenges. Its consumer healthcare business is generating anemic growth. Sales for Remicade are likely to continue to decline. But Johnson & Johnson has a solid drug pipeline and the financial flexibility to make acquisitions to drive growth. For investors with long-term perspectives, there's probably no bad time to buy Johnson & Johnson.

Keith Speights owns shares of AbbVie and Pfizer. The Motley Fool owns shares of and recommends Johnson & Johnson. The Motley Fool has the following options: short May 2018 $140 calls on Johnson & Johnson. The Motley Fool has a disclosure policy.