Source: Wikimedia Commons

After Walgreen (NASDAQ:WBA) on March 25 announced that it matched on revenue but fell short on earnings, shares of the world's second-largest publicly traded drugstore chain rose 3%. This came days after Cantor Fitzgerald downgraded the stock to a sell rating and claimed the business would be fairly valued at $50 per share. Based on the business' performance following earnings, though, shareholders appear to disagree. Given this disparity in opinion, should the Foolish investor consider buying into Walgreen, or are analysts right about its dour prospects?

Walgreen couldn't match on earnings but met revenue expectations
For the quarter, Walgreen announced revenue of $19.6 billion. This represents a 5% gain compared to the $18.6 billion the company announced in the year-ago quarter and matched analyst expectations. In its report, management attributed the sales increase to two factors; higher comparable-store sales and a greater number of locations in operation.

According to the company's earnings release, the primary driver behind its rising sales was the 4.3% jump in comparable-store sales. This improvement compared to the second quarter of its 2013 fiscal year has been chalked up, for the most part, to a 3.4% rise in basket size and a 5.8% increase in comparable-store sales for prescriptions. Another factor behind Walgreen's sales jump was its higher store count. Over the past year, the retailer added 138 drugstores to its roster.

While Walgreen was successful in pleasing investors on the search for revenue growth, it disappointed on the profit front. For the quarter, the company saw its earnings per share come in at $0.78. This is $0.01 lower than last year's results and fell 16% below the $0.93 analysts hoped to see.

Despite benefiting from rising sales, Walgreen was negatively affected by higher costs. The main detriment to the business was its cost of goods sold, which rose from 69.9% of sales to 71.2%. Both pharmacy and front-end operations were hurt, as the company faced a less severe flu season, a decline in generic drugs compared to a year earlier, and a greater investment in promotions.

How does Walgreen compare to its peers?
Between 2010 and 2013, Walgreen was able to grow its revenue by 7% from $67.4 billion to $72.2 billion. This is a fairly solid performance, but how does the company fare when stacked up against CVS Caremark (NYSE:CVS) and Rite Aid (NYSE:RAD)?

  2013 Revenue (billions) 2010 Revenue (billions) Improvement
Walgreen $72.2 $67.4 7.1%
CVS Caremark $126.8 $95.8 32.3%
Rite Aid $25.4 $25.7 -1.1%

Source: Walgreen, CVS, and Rite Aid

When it comes to revenue growth, the poster child in the industry has been, without a doubt, CVS. Over the past four years, the world's largest drugstore chain saw its revenue soar 32% from $95.8 billion to $126.8 billion. In its annual report, management said that higher comparable-store sales and a greater store count were the main drivers behind its jump in sales.

The situation for Rite Aid hasn't been so pretty. Over the past four years, the smallest of the big-three drugstore chains saw its top line contract 1% from $25.7 billion to $25.4 billion. As opposed to Walgreen and CVS, both of which have focused on growing their retail outlets, Rite Aid has consolidated operations and focused on improving its bottom line.

Examining revenue alone, it may seem as though CVS is the better prospect, but the picture isn't quite that clear. From a profitability perspective, CVS has done the best, as evidenced by its net profit margin hovering at around 3.6%, but Walgreen has been catching up.

  2013 Net Profit Margin 2010 Net Profit Margin
Walgreen 3.4% 3.1%
CVS Caremark 3.6% 3.6%
Rite Aid 0.5% -2%

Source: Walgreen, CVS, and Rite Aid

Between 2010 and 2013, Walgreen's net profit margin ticked up modestly from 3.1% to 3.4%. This data suggests that CVS has focused more on growing its top line, while Walgreen's main emphasis has been on increasing revenue while achieving margin improvement.

Rite Aid is another creature entirely. Over the same period noted above, the company has seen its net profit margin improve drastically from -2% to 0.5%. Although this is a great deal worse than its larger rivals, the company's struggle to consolidate its operations and return from years of net losses to profitability is beginning to bear fruit.

Foolish takeaway
In spite of Walgreen's mediocre second-quarter results, shareholders appear to be hopeful about where the business is headed. This should provide the Foolish investor with a fairly safe prospect. But if high growth is what you are looking for, then CVS may be a better opportunity. Probably the most interesting company though, is Rite Aid. Over the past four years, the business has seen its revenue fall, but the rising margins point toward a company that could create great value if the trend continues.

Daniel Jones has no position in any stocks mentioned. The Motley Fool recommends CVS Caremark. 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.