After a one-year 500% return, any suggestion that Rite Aid (NYSE:RAD) is cheap might sound ludicrous. Yet two metrics in particular indicate that Rite Aid is still significantly cheaper than its peers Walgreen (NASDAQ:WBA) and CVS Caremark (NYSE:CVS) and has more room to improve.

What's behind the rally?
After a half-decade of net losses and increased debt, Rite Aid has produced four consecutive quarters of net income. The company has consistently crushed its own estimates while having to increase guidance on a quarterly basis. As a result, its stock has soared higher, and investors are believing in its turnaround.

Now, in reality, Rite Aid's story from rags to riches has little to do with some great operational change on behalf of management. Instead, Rite Aid has been the beneficiary of the patent cliff, a period of five years in which more than $130 billion of brand-name drugs are losing patent protection.

Currently, we are in year three of this five-year period, and many of the market's biggest blockbuster drugs, like Nexium, Abilify, and Crestor, have yet to lose patent protection. But the reason Rite Aid has benefited from new generic introductions to date is because generic drugs pay high margins to pharmacies.

Rite Aid has explained this process thoroughly in each of its last four conference calls and 10-K filings, as has Walgreen and CVS. It is for this reason that Rite Aid's profit margin has soared to 1.2% from negative 1% over the past year.

Is Rite Aid still cheap?
Rite Aid is not the only pharmacy that has benefited from new generic introductions. Both Walgreen and CVS have reaped the benefits as well.

Over the past year, CVS and Walgreen have seen their stocks soar 47% and 80%, respectively. While all three pharmacies have seen same-store sales rise, Walgreen and CVS both have grown at significantly greater rates and have also seen strong margin improvements.

However, Rite Aid has traded higher than either of its peers because of the way it was priced last year, almost in anticipation of a bankruptcy more so than a turnaround. Hence, the unexpected turnaround and consistent profits are what have forced Wall Street to reassess and appropriately value Rite Aid.

With that said, is it possible that Rite Aid is still cheap? If we look at its price-to-earnings multiple of 18, it is cheaper than Walgreen at 23 times earnings and CVS at 19 times earnings. However, using price-to-earnings is a bit misleading because Rite Aid's margins are so much lower than its peers and because of the speed at which margins are improving in the entire industry.

Moreover, Walgreen and CVS have profit margins that are about three times greater than Rite Aid's, putting both on a higher level but also leaving Rite Aid more room to improve.

Therefore, I am more concerned with sales as a valuation metric. It is sales that create profit and will make Rite Aid cheaper if margins continue to improve. Also, I want to look at operational cash flow, which gives us an idea of the money being earned from day-to-day operations. Hence, check out Rite Aid's price-to-sales and price-to-operating cash flow ratio compared to its peers, and this after its one-year 500% return.

Company

Price-to-Sales Ratio

Operating Cash Flow

Rite Aid

0.21

7.1

CVS

0.63

13.4

Walgreen

0.78

13.1

Clearly, Rite Aid is still the cheapest of the three large pharmacies.

On a price-to-sales comparison, CVS and Walgreen are three to four times more expensive than Rite Aid. And despite the fact that CVS and Walgreen have significantly greater margins and profitability, Rite Aid is also cheaper on an operating-cash-flow basis.

This fact brings up an interesting point: If new generics continue to be introduced into the market, and margins rise further, Rite Aid not only has the most to gain in terms of profitability, but its stock will stay attractive despite large future gains.

Final thoughts
The bottom line is that fundamentals, macro shifts, and valuations suggest that Rite Aid is still cheap after a 500% one-year gain.

This is a perfect illustration of stock performance not being an indication of value in the market. To put this another way, Rite Aid could double from current levels and it would still be significantly cheaper compared to sales and comparable to its peers in operating cash flow.

With that said, the majority of Rite Aid's gains have come and gone. We are unlikely to see another 500% rally unless the profit margin increases from 1% to 3%. But nonetheless, at this point in time, Rite Aid is still the best value in the pharmacy space and is still cheap. 

Fool contributor Brian Nichols owns Rite Aid. 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.