Costco Wholesale Corp posted a higher quarterly profit as it sold more gasoline and got a boost from stronger foreign currencies.

The largest U.S. warehouse club earned $324 million, or 73 cents a share, in its fiscal third quarter ended May 8, compared with a profit of $306 million, or 68 cents a share, a year ago.

Costco, which sells everything from gas to diamond necklaces at a discount to its members, said net sales rose 16 percent to $20.19 billion in the quarter.

Sales at stores open at least a year, or same-store sales, rose 12 percent. Excluding inflation in gas prices and stronger foreign currencies, same-store sales rose 7 percent.

The quarterly results include a pretax charge of $49 million or 7 cents a share.

Shares of the company closed at $81.35 on Tuesday on Nasdaq.

(Reporting by Renju Jose in Bangalore; Editing by David Holmes)