What happened

Shares of Costco Wholesale (COST -0.56%) were tumbling today after the warehouse retailer delivered a first-quarter earnings report that sparked questions about the long-term direction of the business as margins compressed in the quarter and operating income was down slightly. As a result, Costco stock was down 7.9% as of 12:30 p.m. EST on Friday.

So what 

Broadly speaking, Costco posted another solid quarter. The buy-in-bulk retailer said comparable sales excluding fuel sales and currency exchange were up 7.5% globally and 8.3% in the U.S., and e-commerce sales jumped 26%. Earnings per share rose from $1.45 to $1.73, beating estimates at $1.65, though the gain was due entirely to a lower tax rate. 

Several cars parked at a Costco parking lot

Image source: Costco.

However, Costco's armor in the retail wars began to show dents as margins narrowed due to a hypercompetitive environment. The company has made investments in e-commerce and seen pressure on its grocery margins as Walmart (WMT 0.10%) and Kroger (KR 1.61%) have ramped up their grocery pickup programs and Amazon.com (AMZN -2.05%) has dived into the industry through its acquisition of Whole Foods.

Those investments at Costco led to a 50 basis point drop in gross margin, a sign that even the strongest brick-and-mortar retailers are being forced to adapt. And that led to a slight drop in operating income from $951 million to $949 million.  

Now what

Membership growth remained strong, and membership fees increased 9.5% in the quarter following a price hike last year. Renewal rates also improved slightly.

Costco is clearly still in a strong position, but given the stock's relatively high price, especially for a retailer with a P/E of 29, investors have had high expectations. The sell-off is no immediate cause for alarm, but investors should keep their eye on the margin trend in coming quarters, especially as the company laps the effect of the tax reform law.