Costco Wholesale whizzed past analysts' estimates for quarterly profit on Thursday as the warehouse club operator's margins were lifted by a drop in gas prices and a shift to lower-cost sourcing, sending its shares up 5 percent.
The company also said pricing pressure on its groceries business had decreased, adding to the upbeat sentiment.
A highly competitive U.S. grocery industry, coupled with the looming threat of Amazon.com expanding its presence in the space, forced Costco and other grocers to slash prices last year and to invest heavily in stores and online.
Kroger, one of the largest grocery chains in the United States, said earlier on Wednesday that it would spend up to $3.2 billion to overhaul stores and improve its online business.
Costco has also bolstered its delivery operations and offers same-day grocery delivery with Instacart.
The company is investing on strengthening its online business, sprucing up its website with everything ranging from Apple MacBooks to La Mer cosmetics.
The efforts paid off, with online comparable-store sales, excluding the impact of fuel price and currency changes, rising 25.5 percent in the second quarter ended Feb. 17.
But Chief Financial Officer Richard Galanti played down expectations of easing competition in the grocery space.
"I believe there is little less pricing pressure... But don't get me wrong. As soon as we have a good quarter, the next quarter will change that."
Costco said it will raise its starting wages to $15 and $15.50 per hour, from $14 and $14.50 per hour in the United States and Canada amid a tight labor market.
The increases, along with higher wages for supervisors, will add 3 to 4 basis points to selling, general & administrative expenses over the next four quarters, the company said.
In the second quarter, the company's gross profit margin increased 31 basis points to 11.29 percent. Profit margins had fallen in the prior three quarters, according to Refinitiv data.
Margins for Costco, which operates gas stations at its warehouses, was also fueled by lower gas prices.
Net income attributable to the company rose to $889 million, or $2.01 per share, from $701 million, or $1.59 per share, a year earlier. Analysts on average had expected a profit of $1.69 per share, according to IBES data from Refinitiv.