Source: Rite Aid.

Drugstore giant Rite Aid (RAD) has been on an impressive upswing over the past few years, thanks to a renewed focus on being a provider of health and wellness products, a strategy also in vogue at larger competitors Walgreen (WBA -0.35%) and CVS Caremark (CVS 0.25%). Rite Aid's renewed focus has significantly improved its profitability and financial profile, powering a more than 500% gain for its stock price over the past five years.

Despite weather-related headwinds, the company's latest results were more of the same, as evidenced by positive comparable-store sales growth as well as a further improvement in its adjusted operating profitability. So, after a big, multiyear run, is Rite Aid still a good bet?

Chart forRite Aid Corporation (RAD)

Source:  Yahoo! Finance.

What's the value?
Rite Aid is the No. 3 player in the domestic drugstore space, operating nearly 4,600 stores around the country that dispense roughly 300 million prescriptions per year. The company's debt-fueled expansion strategy placed it in a precarious financial position during the financial crisis in 2009. Rite Aid narrowly made it over the hump, thanks in part to agreeable debt holders who provided the wiggle room necessary for the company to keep its store network intact. Rite Aid is now reaping the rewards of its large footprint; it is benefiting from its drugstores' increasingly important position in the health care delivery system as well as from a loyal customer base that is attracted to its convenient neighborhood locations in 31 states.

The rewards have flowed down to Rite Aid's financial statements. This has been highlighted by four straight years of increases in operating income, including a 6.3% jump in its latest fiscal year. More important, the improved profitability has led to much better operating cash flow, a far cry from the situation of only a few short years ago. The net result for Rite Aid is an ability to simultaneously pay down debt and fund its growth initiatives, like the ongoing overhaul of its store base into management's next-generation Wellness format.

Chasing down the leaders
Rite Aid may be out of the woods with regard to its solvency issues. But it still has much more work to do in order to catch sector leaders Walgreen and CVS, both of which have larger footprints and fill more than twice as many annual prescriptions as Rite Aid. While Walgreen and CVS have pursued vastly different strategic road maps, both companies have the same general goal of building impenetrable moats, capable of withstanding the advances from a myriad of smaller competitors.

Walgreen, the larger of the two with nearly 8,500 stores, has pursued horizontal integration by continuing to buy up competitors in the drugstore space, including the tuck-in acquisitions of USA Drug and Kerr Drug in FY 2013. The company has also broadened its strategy to include international markets. This was highlighted by its 2012 purchase of a major stake in U.K. retailer Alliance Boots, one of Europe's largest resellers of health care and personal care products. Combined with its recent sourcing partnership with drug-wholesaling giant AmerisourceBergen, it adds up to an unmatched reach of roughly 170,000 distribution points for Walgreen, designed to give customers little reason to shop anywhere else.

Meanwhile, CVS has chosen a different tack. It put much of its eggs into the vertical integration basket, highlighted by its 2007 blockbuster acquisition of pharmacy benefits manager giant Caremark. Despite lower operating margins in the PBM business, the company's size differential vis-a-vis its competitors allows it to spread its overhead costs across both sides of its business; this leads to higher profitability for its retail operation than that attained by either Rite Aid or Walgreen. The net result for CVS is consistently strong cash flow, funding its retail growth initiatives. These include the expansion of its in-store MinuteClinic franchise, currently tipping the scales at 800-plus locations.

The bottom line
Rite Aid is undoubtedly on a roll, as better financial results have allowed management to focus on growth initiatives rather than spending all of their time putting out fires. While the big money has likely already been made after the company's huge stock price run, Rite Aid should be a good long-term performer for investors due to the seemingly permanent propensity for health care spending to go only one way: up.