Source: Rite Aid.

Rite Aid (NYSE:RAD) crashed by 7% on Thursday after the company reduced its earnings guidance for fiscal 2015, generating concerns regarding the health of its turnaround. On the other hand, Rite Aid has made impressive progress over the last years, and it still offers substantial room for growth in comparison to peers such as Walgreen (NASDAQ:WBA) and CVS Caremark (NYSE:CVS). Should you buy the dip in Rite Aid?

Bad news
Rite Aid has delivered spectacular returns for investors in the last year, even considering the recent retracement; the stock is up by nearly 195% over the last 12 months. Keeping these explosive gains in mind, the stock was vulnerable to negative news after such a steep rise.

Rite Aid announced that financial results were hurt by higher-than-expected drug costs because of a delay in realizing the expected purchase price reductions for generic medications. In addition, the company is being affected by a bigger-than-expected reduction in reimbursement rates.

Because of these factors, Rite Aid cut its earnings per share guidance for its fiscal 2015 year to between $0.30 and $0.40 per share, versus a previous guidance of $0.31 to $0.42 per share.

On the other hand, Rite Aid also reported strong sales figures for the month of May, indicating that the company is on the right track when it comes to turning the business around.

Same-store sales during the five weeks ended on May 31 increased by 3.5% versus the same period in the prior year. Front-end same-store sales increased 0.5% during May, while pharmacy same-store sales grew 5% in spite of the negative impact from new generic introductions, which reduced sales by approximately 156 basis points. Prescription count at comparable stores increased 3.2%.

Total drugstore sales for the five-week period increased 2.5% to $2.48 billion, versus $2.42 billion in the same period during 2013. Prescription sales represented 68% of total drugstore sales.

The big picture
Rite Aid has made impressive progress in its turnaround efforts lately. The company is restructuring its store base, increasing its focus on health care services, and implementing different plans and promotions to consolidate customer loyalty.

Rite Aid has transformed 1,215 stores into its wellness format, and management plans to remodel an additional 450 stores during the current year. The company has enrolled more than 1.7 million members in its Wellness 65+ loyalty program as of the end of the last quarter, which 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.

Temporary setbacks aside, the company's partnership with McKesson for the sourcing and distribution of generic pharmaceuticals is a smart move when adapting to major industry trends over the years ahead.

Both sales and profit margins have clearly been moving in the right direction over the last several quarters, so Rite Aid is translating its improvements on the commercial and operational level to better financial performance.

Rite Aid vs. Walgreen and CVS Caremark
Both Walgreen and CVS Caremark are much bigger than Rite Aid. Walgreen owns more than 8,600 stores, while CVS Caremark has approximately 7,600 locations, versus a store base of only 4,851 units for Rite Aid.

The market is already highly penetrated, so it's hard to tell if Rite Aid will reach the same size as Walgreen or CVS Caremark, but it's worth noting that the company still has considerable room for expansion in comparison to its bigger peers.

Besides, improving profitability could be a major growth driver for Rite Aid over the coming years. 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.

If management continues leading the company in the right direction, earnings could grow at a faster rate than sales as profit margins rise to levels more in line with those of Walgreen and CVS Caremark.

Foolish takeaway
It's never good to see a company reducing earnings guidance, especially when management is still trying to prove that it can turn the business around. However, sales are still remarkably strong, and this looks like a temporary setback for a company that has come a long way over the last several years. If anything, the dip in Rite Aid looks like a buying opportunity for investors.