Revenue from stores open at least a year is considered a key indicator of a retailer's financial health because it strips away the volatility of recently opened or closed stores.
Last month included one extra Monday and one less Saturday than June 2013, and Walgreen cited that as a factor behind its growth. Mondays are typically the chain's busiest pharmacy day. Drugstores also tend to do more business on weekdays than the weekend because more customers visit to fill prescriptions after seeing their doctors.
Analysts say drug price inflation also helped sales climb for both companies. Walgreen cited Medicaid prescription drug gains as well as growth in 90-day prescriptions offered through its stores.
In-store pharmacies typically fill 30-day prescriptions for customers, but Walgreen has been pushing sales of 90-day prescriptions at its stores, which face competition from mail-order pharmacies that offer the same benefit.
While pharmacy sales jumped, customer visits at Walgreen's established stores fell 2 percent, a detail that Morningstar analyst Vishnu Lekraj found worrying.
The federal health care overhaul has expanded insurance coverage to millions of people, largely through an open enrollment period that wound down this spring. Analysts who cover drugstores say the potential wave of new business from the newly insured has yet to reach drugstores, but that might change as those people start using their coverage.
"I think there's probably a small health care reform benefit ... but no one's even tried to quantify it," said Jeff Jonas, a portfolio manager who follows the industry for Gabelli Funds.
Credit Suisse analyst Edward J. Kelly said in a research note that he expects more of a benefit from the overhaul in the second half of the year.
Shares of Rite Aid and Walgreen both outpaced the broader market in Thursday morning trading. Rite Aid's stock price rose more than 4 percent, or 32 cents, to $7.49, while Walgreen was up 1.7 percent, or $1.25, to $74.29.