The company also operates gasoline stations at many of its locations, typically offering prices cheaper than those of local competitors.
Costco and rivals like Wal-Mart's Sam's Club and BJ's have been seen as bright spots in the struggling retail sector, as cash-strapped shoppers, worried about the weakening U.S. economy, increasingly seek out deals in the clubs.
The trend has spurred sales gains. In June, Costco posted a 9 percent rise sales at stores open a least a year, while BJ's, the third-largest U.S. warehouse club, had a 16.5 percent sales jump on that basis. Comparable-club sales at Sam's Club, which ranks second, rose 8.3 percent.
But rapid increases in gasoline prices can hurt Costco, which replenishes its supplies of the fuel every day. By contrast, traditional gas stations may turn their inventory weekly, meaning they can be selling supplies they had bought when prices were lower.
So far in Costco's fourth quarter, the national average retail price for gasoline has risen to $4.06 a gallon from roughly $3.10, according to data from the U.S. Energy Information Administration.
Costco said profit in its gasoline operations had fallen from a year earlier. In addition, merchandise profits were lower than planned as it tried to maintain attractive selling price points to help drive sales.
The company also declared a quarterly cash dividend of 16 cents a share on its common stock and said its board had approved a buyback of common shares worth up to $1 billion.
This stock repurchase is in addition to the aggregate $5.8 billion amount previously authorized by the board, the company said.
Costco shares, which had risen almost 18 percent in the past year, were down 8.5 percent at $65.91 in early trading, while BJ's fell 4.8 percent and Wal-Mart declined by 1 percent.