Walgreen (NYSE: WAG)CVS (NYSE: CVS), and Rite Aid (NYSE: RAD) have all been performing well recently. All three provide essential services to the American consumer, not the least of which is acting as the retailer of choice for picking up prescription medications. However, as with any industry there will be winners and losers, so let's take a look at why Walgreen might present the best investment opportunity of the three for Foolish investors.

Walgreen impresses
Walgreen recently reported October sales results. When you look at the numbers, notice that Walgreen is performing well at the front of the store (convenience store items) and back of the store (pharmacy items). On an overall basis, you can't find weakness anywhere. 

All numbers are year over year. Comps refers to same-store sales, or results at stores that have been open for at least one year. This excludes new store sales, which can skew results. When comps are up, it indicates that demand is high. 

  • October Sales: Up 6.1%
  • October Comps: Up 5.8%
  • Front-End Sales: Up 3.5%
  • Customer Traffic at Comparable Stores: Up 2.3%
  • Basket Size at Comparable Stores: Up 0.6%
  • Prescriptions Filled at Comparable Stores: Up 5.7%
  • October Pharmacy Sales: Up 7.8%
  • Pharmacy Sales at Comparable Stores: Up 7.9%
  • Pharmacy Flu Shots Administered for the Season: 4.9 Million (3.6 Million last year)

There's a lot to like. Let's see if the same can be said for CVS.

CVS also impressive
CVS recently reported third-quarter results. Investors were pleased. Here are the key numbers:

  • Net Revenue: Up 5.8%
  • Diluted EPS: Up 29.5% to $1.03
  • Retail Pharmacy Prescription Volume: Up 1.4%
  • Retail Pharmacy Comps: Up 5.7%
  • Total Comps: Up 3.6%

Additionally, CVS has generated $3.1 billion in free cash flow year to date, and it expects to generate free cash flow of $4.8 billion-$5.1 billion for the fiscal year. This is good news for investors, as it means more capital is likely to be returned to shareholders.

Next up: Rite Aid

Rite Aid: good news/bad news
Rite Aid has seen stock appreciation north of 287% year to date. This far exceeds Walgreen and CVS, which have seen stock appreciation of 64.06% and 34.16% year to date, respectively.

Rite Aid bulls will be in full-fledged attack mode after the following statement, but Rite Aid falls short of Walgreen and CVS when it comes to quality operations. This will be evidenced soon.

It should first be pointed out that the primary reason Rite Aid's stock has outperformed those of its peers is because Rite Aid was the hardest hit in 2008/2009. The raging bull market we have seen over the past several years has pulled many sub-par real-world performers up with it. When this tide recedes, or at least when the market begins to act rationally, you're likely to see the top real-world performers outperforming their peers. 

With that out of the way, let's take a look at some recent numbers for Rite Aid, beginning with October:

  • Comps: Up 2.1%
  • Front-End Comps: Down 0.6%
  • Pharmacy Comps: Up 3.4%
  • Prescription Count: Up 1.1%
  • Total Drugstore Sales: Up 2.2%

Those numbers aren't bad, but when you look at the bigger picture with the numbers below, there would be little reason to opt for Rite Aid over its peers. All numbers below are year to date: 

  • Comps: Down 0.1%
  • Front-End Comps: Down 0.1%
  • Pharmacy Comps: Down 0.1%
  • Prescription Counts at Comparable Stores: Up 0.2%

Once again, these numbers aren't bad. It's just that Rite Aid shouldn't be capable of outperforming its peers on a sustainable basis. If you still don't believe in this theory, then consider some key metric comparisons:

 

Forward P/E

Profit Margin

Dividend Yield

Walgreen

15

3.39%

2.10%

CVS

14

3.56%

1.40%

Rite Aid

16

1.22%

N/A

While anything is possible for Rite Aid, it would be logical to invest in a company that pays a dividend, sports a higher profit margin, and is trading at a more appealing valuation. Then you also have to take leverage into account:

 

Cash and Short-Term Equivalents

Long-Term Debt

Walgreen

$2.11 Billion

$5.05 Billion

CVS

$1.18 Billion

$9.38 Billion

Rite Aid

$144.17 Million

$6.05 Billion

While none of these companies offers a positive balance sheet, Walgreen has the most manageable situation. This might not matter now, but it will when interest rates eventually increase. 

The bottom line
Walgreen and CVS have delivered more impressive numbers than Rite Aid has recently. They also offer stronger fundamentals. Walgreen offers the highest yield, the best debt management, and its October results demonstrated strong comps growth, which indicates high demand. If these three companies were to be ranked for long-term investment potential, they would be ranked: Walgreen, CVS, Rite Aid.

Can Obamacare equal profits for you? 
Obamacare seems complex, but it doesn't have to be. In only minutes, you can learn the critical facts you need to know in a special free report called Everything You Need to Know About Obamacare. But don't hesitate; because it's not often that we release a FREE guide containing this much information and money-making advice. Please click here to access your free copy.

Dan Moskowitz has no position in any stocks mentioned. The Motley Fool has no position in any of the stocks mentioned. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.