Two big pharma stocks posted nearly identical gains over the last 12 months. Eli Lilly's (LLY -1.00%) share price is up slightly under 15% during the period. The same is true for Pfizer (PFE -3.85%) stock.

But which of these two drug stocks is the better choice for long-term investors? Here's how Eli Lilly and Pfizer stack up against each other.

3 scientists in a lab

Image source: Getty Images.

The case for Eli Lilly

Let's first address the challenges that Lilly faces. Sales of three of the company's top six drugs declined in 2016. Humalog's sales slipped 3% year over year, while sales for Alimta and Cymbalta fell 8% and 9%, respectively. Lilly also loses patent exclusivity for its second-highest moneymaker, Cialis, later this year. 

That's the bad news. But there's plenty of good news for Lilly as well. Diabetes drug Trulicity is on track to top $1 billion in sales in 2017. Sales are soaring for cancer drugs Erbitux and Cyramza. Lilly is also seeing solid growth for diabetes drug Trajenta.

The company's newer drugs provide the best news of all. In 2016, Lilly launched Taltz in the U.S. and Europe for treatment of psoriasis. Late-stage studies are underway for a couple of other autoimmune diseases -- psoriatic arthritis and axial spondylo-arthritis. Taltz could reach peak annual sales of up to $5 billion if approved for all indications.

Lilly recently won European approval for rheumatoid arthritis drug Olumiant. A decision by the U.S. Food and Drug Administration (FDA) is expected by mid-April. Although the rheumatoid arthritis market is pretty crowded, Lilly could have another blockbuster on its hands.

The drugmaker is collaborating with Pfizer on experimental pain drug tanezumab, which is being evaluated in several late-stage clinical studies. Two late-stage studies are underway for galcanezumab in treating cluster headaches and preventing migraines. In addition, Lilly recently completed its acquisition of CoLucid Pharmaceuticals, picking up another late-stage pain candidate, lasmidtan.

Perhaps the biggest wild card with Lilly's pipeline is its experimental Alzheimer's disease drugs. Solanezumab flopped in late-stage studies targeting mild and early-stage forms of the disease. However, Lilly and partner AstraZeneca are evaluating a BACE inhibitor in a late-stage study for early and mild Alzheimer's disease.

Wall Street thinks that Lilly's new drugs and pipeline will drive earnings higher by an average of 12% annually over the next few years. In the meantime, investors can enjoy Lilly's dividend, which currently claims a yield of 2.5%. 

The case for Pfizer

Pfizer also faces some headwinds. Sales for its top-selling Prevnar 13 vaccine fell 8% in 2016. Its other blockbuster drugs also struggled. Viagra sales dropped 9% last year, while sales for cancer drug Sutent slipped 2%. 

The company's products that have either lost patent exclusivity in the past or are close to losing patent exclusivity aren't faring well, either. Lipitor, Lyrica, and Celebrex are especially weighing down Pfizer's overall sales results.

Still, Pfizer continues to post solid revenue and earnings gains. Sales for cancer drug Ibrance are skyrocketing. Rheumatoid arthritis drug Xeljanz is picking up nice momentum. Perhaps most important, Pfizer's recent acquisitions should fuel additional growth.

The big drugmaker made two big deals last year, acquiring Anacor and Medivation. The Anacor acquisition brought Eucrisa into Pfizer's lineup. The drug recently won regulatory approval for treating eczema. Pfizer's purchase of Medivation allowed the company to pick up prostate cancer drug Xtandi. Both Eucrisa and Xtandi should generate several billions of dollars each in annual revenue for Pfizer at their peaks. 

Pfizer awaits regulatory approval for seven programs. Probably the most eagerly anticipated in this group is anti-PD-L1 monoclonal antibody avelumab. The experimental drug could provide a nice boost to Pfizer's already successful oncology portfolio.

The company's pipeline also includes 34 late-stage programs. Additional indications for Ibrance, Xeljanz, Xtandi, and avelumab could be on the way if some of these late-stage studies go well. Pfizer also has several promising new candidates in late-stage development, including tanezumab and inotuzumab ozogamicin (try saying that one three times in a row).

Wall Street thinks Pfizer will grow earnings by an average of more than 6% over the next few years. The company's dividend yield of 3.77% adds even more return for investors.

Better buy

Valuation is important. Lilly stock trades at 19 times expected earnings. Pfizer's current share price is only 12 times expected earnings. Pfizer looks very attractively valued right now.

I also tend to agree with the old adage that a bird in the hand is worth two in the bush. Pfizer's dividend is better -- and I don't think there's much risk that it will be reduced. Lilly's success seems much more dependent on things going well for its pipeline than is the case for Pfizer, in my view. 

Eli Lilly isn't a bad pick. But I think Pfizer's the better buy.