The company's net loss of $83.9 million, or 10 cents per share, in the fiscal third quarter ended on November 28, was narrower than the loss of $243.1 million, or 30 cents per share, a year earlier.
Analysts expected a loss of 18 cents a share, and sales of $6.38 billion, according to Thomson Reuters I/B/E/S.
Still, Rite Aid's streak of losses remains a major concern.
Their loss is far better than what the expectations were, but then again, we're seeing that this is the 10th loss in a row. They've lost now over $4.3 billion over the past 10 quarters, said Toon van Beeck, senior industry analyst at IBISWorld Inc.
Shares were up 7 cents, or 4.5 percent, in premarket trade.
Rite Aid's quarterly sales fell 1.8 percent to $6.35 billion and sales at stores open at least a year, or same-store-sales, fell 0.5 percent in the quarter.
Rite Aid got a boost from its pharmacy division, which reported that same store sales rose 0.4 percent, and from prescriptions filled which were up 1.5 percent.
Prescription sales made up about 68.6 percent of total drugstore sales, while third-party prescription revenue accounted for 96.2 percent of pharmacy sales.
For the full fiscal year, the company said it expects sales of between $25.6 billion to $25.9 billion, with same-store sales in a range of down 1 percent to up 0.5 percent.
Rite Aid also narrowed the range of its expected fiscal year loss to between 50 cents and 66 cents a share, compared with the loss of 48 cents to 74 cents a share it forecast in September.
During the quarter, Rite Aid opened three new stores, relocated 13 more, and closed 14 locations.
Rite Aid operates most of its stores on the East and West U.S. coasts and trails Walgreen Co and CVS Caremark Corp in sales, number of locations and market share.
(Reporting by Jessica Wohl in Chicago and Phil Wahba in New York, editing by Dave Zimmerman)