Wal-Mart Stores Inc., the world's largest retailer, and Costco Wholesale Corp. reported a better-than-expected rise in May sales s record gasoline and food prices led shoppers to prefer discount chains.

The world's largest retailer also saw its first increase in same-store sales in more than two years at its lagging home business. Wal-Mart sales excluding fuel at stores open at least a year in May rose 3.9 percent, which was more than double the 1.6 percent average estimate of analysts surveyed by Thomson Reuters.

Wal-Mart also said shoppers had cashed about $350 million worth of tax rebate checks in its stores.

There's no way for us to know how much of that $350 million has been spent in the store, Chief Financial Officer Tom Schoewe told reporters in Rogers, Arkansas, the day before Wal-Mart's annual shareholders meeting.

He added, it's clear there was a positive influence from that.

Meanwhile, Costco reported a 9 percent gain, helping aggregate retail sales climb a better-than- forecast 3 percent, the International Council of Shopping Centers said.

Gasoline prices have lingered near $4 a gallon and causing costs for bread and milk to surge.

Wal-Mart rose $1.91, or 3.3 percent, to $59.59 at 11:57 a.m. in New York Stock Exchange composite trading, adding to a 21 percent gain this year before today. Costco gained 3 percent.