It's been a very different year so far for two big pharma stocks: One's hot and one's not. Things are going great for GlaxoSmithKline plc (GSK -0.88%) as its share price is up around 15% year to date. But for Johnson & Johnson (JNJ 0.22%), it's a different story. J&J stock is down more than 10% in 2018.

Like the mutual fund disclosures say, though, past performance isn't indicative of future results. Which of these two stocks is the better pick for long-term investors? Here's how GlaxoSmithKline and Johnson & Johnson compare.

Three scientists in lab

Image source: Getty Images

Growth prospects

Wall Street analysts think that GlaxoSmithKline could grow its earnings by an average annual rate of 8.8% over the next five years. That's higher than the consensus annual average earnings growth projection of 7.8% for Johnson & Johnson. 

GSK's current growth stems in large part from its vaccines business. Shingles vaccine Shingrix, which won Food and Drug Administration (FDA) approval in October 2017, is a major source of that growth. The company's respiratory drugs, particularly Nucala and the Ellipta portfolio, also are enjoying strong sales growth and should continue to do so.

One current growth driver for GlaxoSmithKline could face some headwinds. The company's HIV drugs Tivicay and Triumeq have been big winners. GSK also has a new two-drug HIV combo on the market -- Juluca. However, Gilead Sciences also has Biktarvy, a new HIV drug on the market, which market research firm EvaluatePharma projects will be the biggest new drug launched in 2018. GSK could find itself in a tough battle for market share against Gilead's new drug.

Johnson & Johnson is really three big businesses rolled into one. The company's consumer-healthcare segment has been the weakest of the three recently, but its revenue still increased by a respectable 5.3% in the first quarter. J&J's medical devices segment grew sales even more -- although acquisitions helped fuel much of that growth. Both businesses should provide steady, if not spectacular, growth in the future.

The biggest source of growth for Johnson & Johnson, though, has been and should continue to be its pharmaceuticals segment. Autoimmune disease drug Stelara and prostate cancer drug Zytiga generated the greatest growth in Q1 in terms of dollars. The company saw even higher percentage growth for multiple myeloma drug Darzalex.

J&J's 2017 acquisition of Actelion also has boosted its revenue considerably. While the year-over-year impact of the deal will fade later in 2018, the deal highlights that the company can -- and likely will -- use its ample financial resources in the future to make more deals that generate top- and bottom-line growth.

The greatest downside for Johnson & Johnson is Remicade. Sales are declining for the autoimmune-disease drug as a result of biosimilar competition. The problem is that Remicade still is J&J's top-selling product.

Valuation

GlaxoSmithKline appears to be more attractively valued than Johnson & Johnson regardless of which valuation metric is used. GSK stock trades at less than 14 times expected earnings, while J&J's forward earnings multiple currently stands at 14.3.

One of my favorite valuation metrics to use is enterprise value-to-EBITDA (EV/EBITDA), which factors in balance sheet numbers like cash and debt. GSK's EV/EBITDA ratio is 9.8, well below J&J's 14.5.

Dividends

I think there's a quantity-versus-quality argument when comparing these two big pharma companies' dividends. GlaxoSmithKline claims a sky-high dividend yield of more than 6.5%. J&J's dividend yields a solid -- but much lower -- 2.6%.

On the other hand, J&J's dividend appears to be on much firmer ground. The company is a Dividend Aristocrat, with 56 consecutive years of dividend increases. J&J uses less than half of its free cash flow to fund its dividend program, providing plenty of flexibility for future dividend hikes. GlaxoSmithKline uses nearly 87% of its free cash flow to pay dividends.

Better buy

GlaxoSmithKline looks like the better stock in pretty much every category. Wall Street thinks its growth prospects are better than J&J's. GSK stock claims a more attractive valuation and its dividend yield is much higher than Johnson & Johnson's. That would be the case even if GSK had to cut its dividend somewhat.

But I still think Johnson & Johnson actually is the better stock for long-term investors. Why? For one thing, I question whether GSK's growth will be higher than J&J's over the long run. GSK depends heavily on its HIV franchise, and I suspect Gilead could put a bigger dent in GSK's HIV franchise growth than some expect.

Johnson & Johnson also claims a stronger moat. Like the castles of long ago that had moats filled with water to protect them from enemies, J&J's exposure to multiple arenas within healthcare combined with its respected brand give it some competitive advantages that others don't have. 

GSK is winning so far in 2018, but I see Johnson & Johnson as similar to the tortoise in the fabled race between the tortoise and the hare. The hare was in the lead temporarily, but it was the tortoise that ultimately won the race.