Source: Rite Aid.

Rite Aid (RAD -25.00%) is up by an explosive 55% year to date, as the company continues implementing a remarkable turnaround. Furthermore, when considering Rite Aid's room for improvement and potential valuation versus bigger peers such as Walgreen (WBA -1.88%) and CVS Caremark (CVS -0.99%), the company is still offering substantial room for gains in the years ahead.

A healthy turnaround
Rite Aid has clearly been moving in the right direction over the last several years. The company has produced material improvements in financial performance by closing unprofitable stores and implementing an ambitious plan to relocate and remodel locations.

Rite Aid has transformed 1,215 stores into its wellness format so far, and management plans to remodel an additional 450 stores during the current year. According to the company, front-end same-store sales in the wellness stores exceeded the non-wellness stores by 320 basis points, and script growth in the wellness stores exceeded the non-wellness stores by 1% during the company's fiscal 2014 year ended on March 1. Considering these statistics, the wellness format seems to be having a considerable positive impact on performance.

The company is successfully growing its Wellness 65+ loyalty program, targeting the key senior demographic. Rite Aid has enrolled more than 1.7 million members in its Wellness 65+ loyalty program as of the end of the last quarter, and this bodes remarkably well in terms of competitive strengths and growth opportunities over the coming years, as seniors are an essential demographic segment in terms of health care demand.

Rite Aid has also expanded its partnership with McKesson for the sourcing and distribution of generic pharmaceuticals as part of McKesson's One Stop proprietary generics program. This will generate important efficiencies in terms of lower purchasing costs and reduced working capital requirements for Rite Aid; management estimates the agreement will cut capital requirements by $150 million during the coming year.

Financial performance has materially improved over the last several years, with both sales and earnings consistently rising. April sales data was particularly encouraging, as Rite Aid announced a strong increase of 5% in same-store sales versus the same month in the prior year.

Source: Rite Aid.

According to CEO John Standley, Rite Aid is moving beyond the turnaround phase, and the company is now free to focus on growth over the years ahead:

Because of our continued positive momentum, we are now in a position to evolve our strategy from one that focuses on turning our company around to one that emphasizes growth. Because of the rapid change taking place throughout the health care industry, we believe there is enormous opportunity to meet evolving marketplace needs, better serve our customers, and demonstrate our value to the health care system.

Upside potential: Rite Aid vs. Walgreen and CVS Caremark
Both Walgreen and CVS Caremark are much bigger than Rite Aid, and they have produced consistent profitability for investors over the last few years, so they arguably deserve a valuation premium versus Rite Aid.

But it's important to note that Rite Aid is offering substantial upside potential in the event the company continues on the right track via sales increases and expanding profitability. Under this scenario, the stock should trade at a considerably higher valuation level.

Rite Aid has a net profit margin in the area of 0.8% of sales, just a small fraction of the 3.7% net profit margin produced by Walgreen and the 4.4% net margin generated by CVS Caremark.

This is reflected in a much lower valuation for Rite Aid in terms of sales. Rite Aid trades at a price-to-sales ratio of 0.3, less than half the price-to-sales ratios of Walgreen and CVS Caremark, which trade at 0.89 and 0.7, respectively.

Data Source: FinViz.

If Rite Aid can continue generating growing sales, and the company manages to increase profit margins to levels more in line with those of industry peers, the stock should deserve a considerably higher valuation. Potential for gains is hardly over for investors in Rite Aid.

Foolish takeaway
Rite Aid is clearly moving in the right direction, and the company looks ready to leave the turnaround phase in the past in order to focus on growth opportunities during the years ahead. Furthermore, comparing valuation and profit margins against competitors such as Walgreen and CVS Caremark, the company is still offering substantial upside potential from current levels.