Last December, investors panicked after Costco Wholesale (COST -0.44%) reported that gross margin declined in the first quarter of its 2019 fiscal year. That was an overreaction, though. Gross margin bounced back in a big way in the second quarter, driving a huge surge in earnings.

On Thursday, Costco reported another quarter of strong gross margin and rock-solid earnings growth. This performance should give investors more confidence that rising tariffs on Chinese imports won't disrupt the warehouse club operator's profitability.

Another successful quarter

In the third quarter of fiscal 2019, Costco's comparable sales rose 5.6% year over year, excluding the impact of a new revenue recognition accounting rule, as well as fluctuations in gas prices and exchange rates. That was a solid result, although it marked a modest slowdown compared with the first half of the year, when comp sales rose 7% on the same basis.

On a reported basis, gross margin ticked down by 6 basis points year over year. (There are 100 basis points in 1 percentage point.) However, adjusting for the revenue recognition change and gasoline price inflation, gross margin would have increased by 5 basis points. Furthermore, gross margin improved across each of Costco's four main merchandise categories.

Meanwhile, Costco's operating expenses stayed roughly flat as a percentage of sales, despite a significant headwind from wage increases implemented in June 2018 and March 2019. That cost pressure will fade beginning in the fourth quarter.

The entrance to a Costco warehouse

Image source: Costco Wholesale.

The net result was that operating income rose 5.2% year over year to $1.12 billion. Adjusted earnings per share jumped 11% to $1.89, getting an extra boost from a lower effective tax rate. That easily beat the average analyst estimate of $1.82.

Tariffs represent a market share opportunity

With the trade fight between the U.S. and China escalating, many retailers have warned that tariff increases could pinch profits later this year and beyond. Most companies have to strike a delicate balance between raising prices to compensate for tariff costs -- which could lead to lost sales by pricing some consumers out of the market -- and absorbing the gross margin hit from higher tariffs.

However, the calculus is somewhat different for Costco. The company has unrivaled buying power, which allows it to get the best possible prices from suppliers. And while price increases are inevitable as tariffs rise, other retailers will, on average, be forced to raise prices even more.

As a result, Costco seemed to gain market share after some of the earlier rounds of tariffs went into effect last year, according to CFO Richard Galanti. Considering the strength of Costco's domestic sales results recently, it would appear that market share gains are far outweighing the dampening impact of any price increases on sales. Indeed, as the lowest-cost retailer, Costco is in good position to keep growing revenue at a steady clip while protecting its profit margin.

Costco will be nimble on pricing

During Costco's earnings call on Thursday afternoon, Galanti indicated that the company will continue its practice of trying to be the last retailer to raise prices. That's part of its commitment to offer outstanding value to its loyal members. Nevertheless, he said Costco will eventually raise prices to the extent that it can't mitigate cost increases.

For some items, at least, the warehouse club giant should be able to raise prices without hurting sales. For example, Galanti noted that patio furniture sales have been strong in recent months despite tariff-related price increases. That said, he acknowledged that some of this strength could be a catch-up effect, after bad weather suppressed patio furniture sales in January and February.

Costco has shown repeatedly over the years that it can use its buying power to beat rivals' prices and thereby gain market share, all while keeping its profit margin roughly steady over time. There's no reason to doubt its ability to do so again in response to rising tariffs.