It's been one of only a few champs in the shadow of coronavirus lockdowns. Like rivals Walmart (WMT -0.02%) and Kroger (KR 2.35%), Costco (COST -0.09%) was able to give consumers the critical basics they needed. Companywide same-store sales for the quarter ending in early May were up 7.8%, driven higher by the 66% year-over-year improvement in the retailer's e-commerce business.

Expectations of -- and then proof of -- that sales growth boosted the stock in a big way too. Costco shares were initially swept lower in February's rather indiscriminate selling, as the coronavirus contagion first hinted it would creep into the United States. But the stock quickly bounced back to reach record highs earlier this month. Demand for simple consumables isn't abating either, seemingly making this ticker a compelling one to own.

Be careful blindly jumping to such a conclusion, though. While last quarter's top-line growth was remarkable, the quarter in question also exposed a potential flaw for the company. Never even mind the fact that the stock started out the pandemic in its usual richly valued state.

A pair of dice resting on a stock chart and labeled buy and sell.

Investors should think twice before jumping into expensive Costco shares after a strangely unimpressive first quarter. Image source: Getty Images.

For starters, it's expensive

Earnings-based valuations aren't everything, but to the extent they matter, Costco shares don't give investors a great deal of earnings-based bang for their buck right now. The stock's trailing 12-month price-to-earnings (P/E) ratio stands at 39.0. Its forward-looking P/E isn't much lower, at a bit over 35.0. For perspective, shares of the aforementioned Walmart are priced at under 25 times its trailing earnings, while Kroger stock presently sports a trailing P/E of around 12.4 and a forward-looking one of 11.7.

Costco investors will argue it's a premium investment that deserves a premium price, particularly given how well the membership-based shopping warehouse helped consumers out in the midst of pandemic lockdowns. And perhaps they're right.

This sort of valuation disparity still pushes the limit of price premiumization, though, especially in light of a red flag that started to wave in Costco's quarterly results for the three-month stretch ending on May 10.

Struggling to adapt

In defense of all three of these food and staples retailers, there was no way to prepare for the COVID-19 pandemic. This type of unprecedented disruption was simply unforeseen.

Of these three grocery and consumer-goods giants, Costco seemed least prepared to profitably capitalize on the sudden scale-up of each of their businesses.

This qualitative idea become evident in some of the quantifiable data. Namely, Costco's subpar operating margins ultimately remained subpar despite a respectable 7.3% year-over-year uptick in sales for the quarter ending in early May.

The table below tells the tale. Kroger was forced to spend considerably more on selling and administrative costs for its most recently completed quarter, most of which was in the shadow of coronavirus lockdown measures. But the grocer was at least able to offset that added spending with relatively lower spending on its inventory.

Walmart's cost of goods edged up slightly last quarter, but its selling and general-operating spending was curbed. Operating profit margins remained about the same as the previous year's comparable quarter for Walmart as well, but its bottom line grew as well as its top line, and its margins remain among the best of the best.

Costco, however, was only able to pay a tad less for its goods than it did during the same quarter of 2019 despite instantly created demand. What little it saved on merchandise costs last quarter was fully offset by increased selling and administrative costs. End result? Operating margins remained the same lackluster 3.2% reported for the comparable quarter from last year.

Kroger, Walmart, and Costco expenses and operating margins as a percentage of revenue

Metric Kroger  Walmart  Costco
Cost of goods sold (Q1'19) 77.8% 75.1% 87%
Cost of goods sold (Q1'20) 75.7% 75.8% 86.5%
Selling, general, and administrative (Q1'19) 16.9% 20.9% 9.7%
Selling, general, and administrative (Q1'20) 18.5% 20.3% 10.3%
Operating income (Q1'19) 2.4% 4% 3.2%
Operating income (Q1'20) 3.2% 3.9% 3.2%

Data source: Kroger, Walmart, and Costco earnings reports for earliest full quarter of 2020

The big take-away

The numbers don't indicate precisely what Costco's impasse may be. They only indicate that both Kroger and Walmart were able to do something Costco couldn't do a quarter ago.

Maybe consumers just wanted to visit a store where they could quickly get what they want without stepping into a sprawling building. Perhaps Costco's supply chains were cut off; it supplies lots of its own food products from centralized sources. It's also arguable Costco's lack of curbside pickup sent consumers to rival retailers like Walmart and Kroger, both of which already offered to bring your online order to your vehicle waiting in their parking lots.

Most plausibly, though, the surprising crimp on Costco's profitability last quarter was the result of a little bit of all these things.

That's not to suggest the club retailer will forever deal with these problems. Any company can adapt. Its competitors have already adapted to the new norm in consumer-goods shopping, while Costco is still closer to the beginning of multiple learning curves. Between the time it will take Costco to become more like Walmart and Kroger, the steep valuation of Costco shares, and the unknowns linked to a resurgence of COVID-19 cases, this retailer isn't a particularly compelling investment right now. Either of its two big rivals seem nimbler and better priced at this time.