Image source: Getty Images.

If you had invested $10,000 in CVS Health (NYSE:CVS) stock back in 2006 and held on for the ride, you'd now have over $20,600. That's not a terrible return considering that the market experienced a free fall during that period. But if you had instead invested the same amount of money in Express Scripts (NASDAQ:ESRX) stock, your account would now have more than $35,400.  

How far you look back makes a difference in comparing these two competitors in the pharmacy services industry. CVS Health's performance over the past five years tripled Express Scripts' results. Successful investing is less about looking in the rear view mirror, though, and more about looking ahead. Which of these two stocks is the better buy now?

The case for CVS Health

CVS Health seems poised to do very well over the next several years. The company plans to increase earnings per share between 10% to 14% annually. One big driver for that growth will be CVS Health's pharmacy services segment, which provides pharmacy benefits management (PBM) services. PBMs act as the middle-men between payers and everyone else in the healthcare system, negotiating prices and taking a cut of the savings.  

There are two major tailwinds that help CVS Health's pharmacy services segment: higher numbers of claims processed and increased use of specialty drugs. Both factors helped the segment post 20.5% year-over-year revenue growth in the first quarter. Look for continued growth in both areas, especially as the U.S. population ages. 

But while pharmacy services generates higher revenue for CVS Health, the company's retail/long-term care (LTC) segment is more profitable. In the first quarter, retail/LTC reported five times as much gross profit as pharmacy services. And this more profitable segment accomplished that feat with $8.6 billion less revenue.

Image source: CVS Health.

CVS Health's retail/LTC segment is also positioned to profit from the aging U.S. population. Filling more prescriptions is the obvious way that the segment will benefit. The company also claims the most retail health clinics with its MinuteClinics. These walk-in clinics, staffed by nurse practitioners and physician assistants, provide cost-effective medical services.

The other way CVS Health intends to increase its EPS is by decreasing the number of shares outstanding via stock buybacks. The company plans to continue its program of repurchasing $4 billion to $5 billion of its stock each year. These share buybacks should drive earnings-per-share growth of 4% to 6% annually.

Then there's the dividend. CVS Health's forward dividend yield currently stands at 1.74%. That's not too shabby. The company says that it will increase dividends to get to a target payout ratio of 35% by 2018. With the payout ratio now at just over 32%, there's still plenty of room for those dividend payments to go up.

The case for Express Scripts

Express Scripts benefits from the same demographic trends that help CVS Health. But instead of adopting the broader health services approach taken by CVS, Express Scripts is laser-focused on the PBM business.

Thanks to multiple mergers and acquisitions over the last several years, Express Scripts now stands as the largest PBM in the nation. Its size gives the company several competitive advantages over smaller rivals, including more leverage in negotiating drug prices and operational economies of scale.

CVS Health's first-quarter revenue for its pharmacy services segment actually was higher than Express Scripts' total revenue for the same period. However, Express Scripts' gross profit percentage doubled that of its rival's PBM business unit.

Image source: Express Scripts.

It seems like a pretty good bet that demand for PBM services will continue to grow in the future. Prescription drug usage will climb with more senior citizens. Payers will need help in controlling the associated costs, especially with new high-priced drugs entering the market. Express Scripts should be able to ride this wave as well or better than any PBM.

Aside from this bright business outlook, there's another investing argument for Express Scripts: The stock is relatively cheap. A dispute with Anthem led to shares of the PBM plunging earlier this year. Although Express Scripts' stock has regained some of that decline, shares still trade at less than 12 times forward earnings. 

Better buy

CVS Health's breadth is definitely a plus. So is the dividend. This is a solid company with a good plan to increase shareholder value. Express Scripts only provides PBM services, but that singular focus is also a positive. It also is a well-managed company that has a track record of executing well.  

Both CVS Health and Express Scripts should do well over the long run. If I had to pick just one, though, my nod would go to Express Scripts. The edge for Express Scripts, in my opinion, is its lower valuation. And if the Anthem matter is settled, the stock should soar. I view Express Scripts stock as a solid long-term play based on its core business -- with a little bit of lottery ticket potential. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.