What happened

Shares of Costco Wholesale (NASDAQ:COST) lost 11.9% in value last month, according to data provided by S&P Global Market Intelligence.

The stock fell after a disappointing earnings report that revealed competition from other top retailers chipping away at Costco's margins.

COST Chart

COST data by YCharts.

So what

Costco shares plunged 9% the day after the company issued earnings results for the fiscal first quarter (which ends in November). The stock still finished the year in positive territory, up 9.5% on the year, while the S&P 500 index lost 6.35% in value in 2018. 

A man moving a shopping cart down an aisle in a wholesale store.

IMAGE SOURCE: GETTY IMAGES.

Revenue for the quarter was $35.1 billion, beating the consensus analyst estimate of $34.8 billion. However, a lower gross margin caused the company to miss earnings estimates by $0.01 on a non-GAAP basis. On a GAAP basis, earnings per share increased 19.3% year over year, primarily the result of a lower tax rate. 

The lower gross margin indicates a heightened competitive environment for groceries, with Walmart and Amazon.com ramping up their investment in that area. During the call, CFO Richard Galanti admitted feeling some pressure from rival retailers in the grocery category.  He said, "On the [fresh food] side we've seen a little bit more margin pressure as there's been a little bit more retail competitive pressure up there. Not only from supermarkets, but [Walmart's Sam's Club] as well."

Now what

This isn't as bad as it seems. Costco has thrived over the years by keeping prices as low as possible, which, in turn, creates loyal customers. The commitment to low prices is what convinces customers to pay a subscription fee just to get to shop at a Costco warehouse. 

Still, competition is heating up on the e-commerce side, where Walmart has been growing faster than Costco. Walmart is winning over customers with its wide footprint of stores combined with its grocery pickup and delivery service. Then there's Amazon, which acquired Whole Foods to begin its quest for grocery domination. 

On the bright side, as my colleague Jeremy Bowman pointed out, membership growth looks healthy. But the coming quarters could be challenging, as competition isn't going away and Costco won't have the benefit of lower tax rates in 2019 to keep earnings growth up.

John Mackey, CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool's board of directors. John Ballard owns shares of Amazon. The Motley Fool owns shares of and recommends Amazon. The Motley Fool recommends Costco Wholesale. The Motley Fool has a disclosure policy.