Image Source: CVS Health

Imagine there are two pharmacies near your home. How do you choose which one to use? For many people, factors in that decision include things like pricing, convenience, and friendliness of the staff.

Now suppose instead that you're considering two pharmacy stocks to buy -- either CVS Health (CVS -0.17%) or Walgreens Boots Alliance (WBA -0.11%). How do you choose between the two stocks? Here are several factors you should consider.

Fundamentals
Investors love growth on both the top and bottom lines. How do CVS and Walgreens compare? It depends on the time horizon you choose.

CVS Revenue (TTM) Chart

CVS turned in the more consistent performance for revenue growth over the past five years. The company also easily beats Walgreens Boots Alliance in total revenue generated. However, if you focus on the most recent year, Walgreens has come on strong, thanks largely to major acquisitions.

CVS Net Income (TTM) Chart

The story is pretty much the same for net income. CVS Health wins easily in the category of earnings growth since 2011. For much of that period, Walgreens was basically stuck in the mud. Over the past year, though, Walgreens jumped to within striking distance of its larger rival on the earnings front.  

Future prospects
While past performance is important, the future is what really matters for investors. It's impossible to know exactly what the future holds for either of these companies, but there are some indicators of what could be in store, and acquisitions will play a key role for both.

CVS Health made two acquisitions in 2015 that could drive future growth. In August, it completed a $12.9 billion buyout of Omnicare, and in December, it closed a $1.9 billion deal with Target to buy the retailer's pharmacy and clinic businesses.

The Omnicare deal puts CVS Health in the driver's seat for providing pharmacy services to long-term care organizations. The ever-increasing number of seniors in this country make long-term care an attractive opportunity, particularly when considering the rapid growth of the assisted living and independent living markets.

Meanwhile, the deal with Target gives CVS 1,672 additional pharmacies in 47 states plus 79 clinics. CVS will operate the pharmacies and clinics under its own brands in a "store-within-a-store" format, giving CVS a path to growth that requires less investment than building stand-alone stores.

Walgreens' 2014 merger with Alliance Boots fueled the company's recent surge in revenue and earnings growth. However, its proposed acquisition of Rite Aid (RAD 25.83%) could be the difference-maker in the years ahead.

In October, Walgreens announced plans to buy Rite Aid for $17.2 billion. The acquisition would likely be financially advantageous to Walgreens on several fronts. There would be cost synergies resulting from consolidated operations. The deal would also give Walgreens even more leverage in negotiating for lower drug prices, which would allow the company to be more competitive against rivals.

The fly in the ointment, though, is that regulators haven't approved the Rite Aid deal yet. Analyst Scott Mushkin with Wolfe Research recently expressed skepticism that approval will be given, because the merger would significantly reduce the choices available to consumers. 

Valuation
These two large pharmacy services companies stack up relatively closely in terms of valuation. CVS Health's trailing 12-month price-to-earnings multiple currently stands at 21. That's a little higher than Walgreens' trailing earnings multiple of 19.

However, looking at forward earnings multiples gives CVS the edge. Walgreens' forward P/E (based on earnings expectations for the fiscal year ending on Aug. 31, 2017) is 15.5. CVS Health's forward earnings multiple (based on earnings expectations for the fiscal year ending on Dec. 31, 2017) is 14.9.

If you want to gaze further into the future with your crystal ball, the price-to-earnings growth (PEG) ratio for five-year expected earnings growth is a good metric to use. Both companies claim very close PEG ratios, but CVS Health's PEG of 1.20 is a little lower than Walgreens' PEG of 1.23.

Picking a winner
All things considered, CVS Health and Walgreens Boots Alliance are pretty evenly matched. Even their dividends are close: CVS' dividend yield is 1.75%, and Walgreens' yield is 1.88%.

If I had to pick a winner, though, I'd give the nod to CVS Health for three primary reasons. First, I like the potential for CVS Health's pharmacy benefits management business. Second, I think both the Omnicare and Target deals will position CVS well for the future. Third, while the attempt by Walgreens to buy Rite Aid is a smart one in my opinion, I'm just not sure if the deal will clear the regulatory hurdles.

Having said all that, I think both of these stocks could be good investments over the long run. And, for what it's worth, you probably wouldn't go wrong by picking either CVS or Walgreens as your local pharmacy of choice.