Costco, the retail industry's wunderkind, seems to be falling from grace.

For much of the past few years, Costco had the most boring earnings reports in retail. Every quarter, it would notch higher growth than its competitors. It would build a few more warehouse stores. It would grow its membership base. It rarely deviated from its formula, and that worked just fine. Until it didn't.

Taking Stock

Costco's shares have risen 190 percent since 2009, but are down 6 percent this year

Source: Bloomberg

Aside from 2008, it was routine for Costco to see year-over-year sales growth between 7 and 12 percent at established stores. But this week, it reported lackluster second-quarter earnings: Comparable sales rose by 1 percent from a year earlier, after three straight quarters of 1 percent declines. Net income fell 8.7 percent to $546 million.

Fuel Factor

Costco's sales hit by fuel impact

Source: Bloomberg

Costco attributed the weakness to lower gas prices (sales excluding fuel fared better) and the strong dollar -- 30 percent of its 700 stores are outside the U.S. Ending its co-branded credit card relationship with American Express also stung a bit. Plus, it's about to absorb an influx of costs as it raises starting wages for the first time in nine years.

Sustained lower gas prices are certainly a problem for Costco -- when drivers can get cheap gas anywhere, they're not compelled to drive all the way out to a warehouse club just to catch a discount, resulting in fewer shopper visits. (There's a counter-argument that lower gas prices encourage people to drive more, but such behavior is more often attributed to lower-end consumers, who don't tend to shop at Costco.)

And what's keeping CFO Richard Galanti up at night? "Everybody in the world never wanting to leave their house and only typing stuff to order and get it at the front door," he told analysts Thursday.

In other words, e-commerce.

Even as shoppers increasingly go online to stock up on bulky items such as toilet paper and diapers, Costco's e-commerce operations lag competitors. Costco's online sales are growing, but Internet Retailer estimates peg them at only $5 billion (out of its $120 billion in annual revenue). Perhaps that's why the company is struggling to attract millennials -- its customers tend to be two years older than the general population.

Costco was a latecomer to e-commerce; it's going to take some time to catch up with its peers and Amazon. The company is spending to modernize its technology and infrastructure, but it seems in no particular hurry. For example, Costco still doesn't let customers buy things online and pick them up in a store.

"We want to do everything possible to get them in the store and not just come and pick something up," Galanti told analysts, explaining why he didn't expect to roll out in-store pickup anytime soon. About e-commerce is general, he said, "some out there would argue it's about time. But we're getting to it."

Perhaps Costco should hustle a bit more.

Its business model was based on building sparse warehouses, selling items at low prices, and collecting membership fees (starting at $55 a pop), which go straight to its bottom line. If it doesn't grow membership, then profits decline. These days, membership-fee revenue Costco isn't growing as it once did. Looking abroad might not help; renewal rates are lower outside the U.S.

Members Only

Growth in revenue from membership fees at Costco

Source: Bloomberg

Instead, it looks like the company is relying on building more stores to attract more customers -- a dangerous strategy at a time when most retailers are closing stores. Home Depot and others have learned this lesson the hard way. Costco's capital spending is at its highest in more than two decades, but revenue growth hasn't kept pace.

Spending Spree

Costco's Annual Capital Expenditures

Source: Bloomberg

Capital expenditures for 2016 is an estimate.

Costco is still a powerful force in retail, with a loyal customer base and a talented executive team. It's smart to focus on its core business, its gargantuan warehouse clubs. But growth in that business is slowing. Failing to evolve quickly enough online -- with better offerings, delivery, and pickup options -- will leave it vulnerable.

This column does not necessarily reflect the opinion of Bloomberg LP and its owners.