It's been a great year for most investors, with the S&P 500 index rising close to 20% in 2017. But not every stock has performed that well. The stocks of two S&P 500 members, GlaxoSmithKline (GSK 0.12%) and Bristol-Myers Squibb (BMY 0.92%), did much worse. 

The past is the past, though. What really matters is how these stocks will perform in the future. Which big pharma stock is the better choice for long-term investors? Here's how GlaxoSmithKline and Bristol-Myers Squibb compare. 

Two scientists standing beside each other in lab

Image source: Getty Images.

The case for GlaxoSmithKline

Yes, there are plenty of knocks against GlaxoSmithKline. The big pharma company badly missed Wall Street earnings estimates in the third quarter. Revenue growth is weak at best. Sales for Glaxo's top drug, Advair, are falling. But there's also good news for the drugmaker.

Glaxo's HIV franchise is performing quite nicely. Both Tivicay and Triumeq are already blockbusters. The two HIV drugs are also on track to each post year-over-year sales growth close to 40% in 2017.

The company also has a bevy of newer respiratory drugs that are picking up steam. Relvar/Breo Ellipta is the biggest winner of the group so far. However, sales are soaring also for Nucala and the rest of the Ellipta family -- Anoro, Arnuity, and Incruse.

Vaccines are another bright spot for GlaxoSmithKline. Sales for meningitis B vaccine Bexsero are on pace to increase by more than 50% in 2017 compared with the prior year. Menveo, Glaxo's combination vaccine for meningococcal strains A, C, W, and Y, should grow sales by close to 40% this year. In addition, the company won FDA approval for new shingles vaccine Shingrix in October.  

Glaxo's pipeline includes several promising late-stage candidates. In particular, the company has high hopes for its two-drug HIV regimens that combine Tivicay with other HIV drugs. Wall Street analysts think these candidates plus Glaxo's newer drugs should help the company achieve annual earnings growth of around 9% over the next few years -- much higher than what Glaxo has done in recent years. 

Investors have enjoyed high dividend yields from GlaxoSmithKline for quite a while. That's still the case, with the dividend currently yielding 5.71%. 

The case for Bristol-Myers Squibb

Bristol-Myers Squibb also has some drawbacks. Sales are falling significantly for its older antiviral drugs, particularly Bristol's hepatitis C franchise. However, there are many more positives than negatives for the company.

The biggest positive of all is Opdivo. Bristol-Myers Squibb has already won FDA approval for the drug in treating 11 cancer indications. Opdivo should generate close to $5 billion in sales this year -- nearly 46% higher than 2016. Thanks to that kind of growth, Opdivo is expected to rank as the No. 2 best-selling cancer drug in the world in the next few years. Bristol is also seeing solid growth for the other drugs in its oncology lineup: Sprycel, Yervoy, and Empliciti. 

Blood thinner Eliquis trails Opdivo in revenue this year, but only narrowly. And sales for the drug are even growing a little faster than for Opdivo. Bristol-Myers Squibb and its partner Pfizer jointly market Eliquis. The drugmaker is also benefiting from solid sales growth for autoimmune-disease drug Orencia.

Bristol's pipeline includes 35 compounds in development. The most important late-stage studies focus on combinations of Opdivo with other drugs in fighting various types of cancer. Bristol-Myers Squibb is either sponsoring or participating in 50 phase 3 studies involving Opdivo as a monotherapy or as part of a combo, according to the U.S. National Library of Medicine's clinical trials database. Continued momentum for Opdivo is key for the drugmaker to achieve the nearly 11% annual earnings growth rate Wall Street analysts project. 

What about the dividend? Bristol's dividend yield currently stands at 2.56%, thanks to a small dividend increase announced earlier this month. The company has flexibility for more dividend increases down the road, with a payout ratio of 61%.

Better buy

There are three main criteria I usually use to evaluate stocks -- growth prospects, dividends, and valuation. Bristol-Myers Squibb wins on growth prospects, with tremendous potential for Opdivo and Eliquis. GlaxoSmithKline, on the other hand, has the higher dividend yield. It also appears to be more attractively valued, with shares trading at less than 13 times expected earnings, compared with Bristol's forward earnings multiple of 19.

However, my view is that Glaxo's late-stage pipeline is somewhat shaky. I'm not convinced that the company's two-drug HIV regimens will fare as well as Glaxo hopes they will against Gilead Sciences' bictegravir/F/TAF combo, which awaits an FDA approval decision. There is also some speculation that GlaxoSmithKline could cut its dividend in the future, especially if it increases spending on acquisitions.

Because of these uncertainties -- and what I see as clear sailing ahead for Opdivo -- I think Bristol-Myers Squibb gets the nod over Glaxo. My hunch is that the company's performance in 2018 should be better than what we've seen this year.