Rite Aid (RAD 5.26%) will release its quarterly report on Thursday, and investors who've bid the stock up to new 52-week highs have to think the news from the drugstore chain will be good. Yet analysts expect that Rite Aid earnings will come in negative, and news that the company could be headed back to losses instead of profits might leave shareholders thinking they've made too big a bet on Rite Aid's recovery.

Rite Aid has long played a distant No. 3 to its major drugstore-chain competitors, as huge amounts of debt have left its stock languishing in spite of sizable gains from its rivals. Yet despite repeated calls for what many see as Rite Aid's inevitable failure, it has managed to survive and even post profits recently. How long can the good times for the stock last? Let's take an early look at what's been happening with Rite Aid over the past quarter and what we're likely to see in its report.

Stats on Rite Aid

Analyst EPS Estimate

($0.04)

Year-Ago EPS

($0.05)

Revenue Estimate

$6.27 billion

Change From Year-Ago Revenue

0.6%

Earnings Beats in Past 4 Quarters

3

Source: Yahoo! Finance.

Could Rite Aid earnings surprise investors again this quarter?
Analysts have gotten less optimistic about prospects for Rite Aid earnings in recent months, widening their August-quarter loss estimates by $0.03 per share and cutting the same amount for their full-year fiscal 2014 profit projections. The stock, though, has climbed substantially, gaining 14% since mid-June.

In its May quarter, Rite Aid posted impressive earnings growth. It reversed a year-ago loss with a profit that was at the top end of previous guidance. As introductions of new generic drugs have been strong lately, Rite Aid has enjoyed a margin boost from the lower costs of generics and the greater percentage markups available.

But the stock dropped after its report because its management is cautious about how long those favorable tailwinds can last. In particular, generic-drug introductions are expected to fall in the future. Moreover, the company has had to deal with costs of refinancing debt, with a June offering of $810 million in eight-year notes with a rate of 6.75% to be used to buy back existing debt carrying a much higher 9.5% interest rate. Buying back old bonds through a tender process will cost the company initially, but annual interest savings will be substantial.

Still, Rite Aid faces the natural challenge of simply being smaller than its rivals. In an industry where convenience is key, the much larger networks that Walgreen (WBA -0.23%) and CVS Caremark (CVS 1.15%) offer represent a substantial competitive advantage. Now that Walgreen has mended its relationship with pharmacy benefits manager Express Scripts (ESRX), it has started to win back some of the customers it lost to Rite Aid. Those figures are showing up in Rite Aid's same-store sales, with flat same-store prescription counts and mixed performance in front-end store comps.

In the Rite Aid earnings report, watch to see if management comments on the latest batch of potential takeover rumors. Some believe that CVS or Walgreen will buy out Rite Aid as an easy growth play. Yet as long as Rite Aid's substantial debt exists, it'll be hard for any company to justify buying the drugstore chain.

Click here to add Rite Aid to My Watchlist, which can find all of our Foolish analysis on it and all your other stocks.