Despite trade-war headwinds and all sorts of scary headlines, the American consumer has actually been fairly strong of late. And yet, not every U.S. retailer is thriving. In fact, many analysts are currently talking about the death of retail as we know it.

Why the contradiction? Because consumers are only flocking toward certain types of retailers, while others -- primarily middle-of-the road department stores based in malls -- are dying out.

Who are the winners? Mainly, retailers with wide variety, lots of inventory, omnichannel capabilities, and discounted prices. These include off-mall discounters, as well as big-box retailers with strong e-commerce offerings to compete with the likes of Amazon.

Two of the winners appear to be Walmart (WMT 0.48%) and Costco (COST 1.15%), which are up a market-beating 22% and 36%, respectively, on the year. But after these big gains, which stock is the best bet right now?

WMT Year to Date Total Returns (Daily) Chart

WMT Year to Date Total Returns (Daily) data by YCharts.

The difference between Costco and Walmart

Both Costco and Walmart are massive discount retailers, but there are a few differences. Costco's model is fairly simple: It collects membership fees from its members and then basically sells items in bulk at rock-bottom prices. The company nearly breaks even on the goods it sells and makes the most of its operating margin entirely from membership fees.

For instance, in its most recent quarter, Costco earned $776 million in membership fees and $1.1 billion in operating income. Non-membership operating margins were only about 1% of the company's non-membership revenue.

A dark haired woman wheels an empty shopping cart down an aisle of a large warehouse store looking at items.

Costco or Walmart? Image source: Getty Images.

Walmart, on the other hand, is more of a traditional retailer -- it just happens to be among the best at leveraging its scale and driving down prices. Walmart does have Sam's Club, which is essentially a copy of the Costco model, but Sam's Club only accounts for about 11.5% of Walmart's overall revenue. The rest comes from Walmart's traditional U.S. superstores (65% of revenue) and international stores (22.3% of revenue). Last quarter, Walmart's operating margin was 4.3%.

Recent results

Walmart is much bigger than Costco already, with about 3.5 times the revenue. That leaves Costco with much more room to grow. However, not only does Costco have more room to expand both domestically and internationally with new stores, it's also seeing much better comparable-store sales growth.

(Most Recent Quarter, YOY)



Comparable-store sales



Total revenue



Operating income






Data source: Costco and Walmart earnings releases. Table by author. YOY = year over year.

As you can see, Costco is clearly outperforming across the board. Of note, Walmart actually showed an operating income decline last quarter. This was due to the company's aggressive investments in e-commerce, faster shipping, and grocery order and pickup to better compete with the likes of Amazon.

Costco's operating margins also fell, as operating income growth trailed revenue growth, but not by as much. This is likely due to the continued challenges both companies are facing around tariffs and increased freight costs that are hurting many retailers.

E-commerce growth: A differentiator or red herring?

As you can see, Walmart's investments seem to be paying off somewhat in the company's robust e-commerce growth. It's moving quickly to match Amazon's two-day shipping, which the e-commerce giant just upped to one-day shipping. Walmart offers free two-day shipping on orders over $35 and recently unveiled next-day shipping in select area codes, biting into the company's margins.

Nevertheless, it's hard to say if this will lead to continued growth for the company or if Walmart will have to invest more and work harder just to stay in place. E-commerce made up half of the company's comparable-sales growth, and while the comp number was pretty good, it still lags behind Costco, as well as some other outperforming retailers like Target, which just reported 3.4% comps.

Meanwhile, Costco's subscription club and "treasure hunt" atmosphere appears to be more resilient to the e-commerce threat. That takes some of the pressure off Costco to innovate quite as quickly. For instance, one analyst asked whether Costco would be looking to match Walmart's grocery pickup and same-day grocery delivery. Costco CEO Richard Galanti replied:

We recognize that they and some others are putting in a lot of financial commitment to doing this. I think what you're going to find is like everything else in life at Costco over time we figure out how to do it our way that makes sense for us that still works... One of the reasons that whether it's Instacart or a smaller scale Shipt in the Southeast, which is growing its geographic footprint, as well as Google, all those things are ways to do that without us having to get into that business in a big way.

Costco's deliberate actions on these fronts is a luxury it seems to have due to its unique business model and sticking to what it does best. As you can see, it hasn't hurt the company's revenue growth.

Valuations and verdict

Costco appears to have a safer business model than Walmart and better growth prospects. As such, Costco may seem like the obvious choice -- though you'll have to pay up for the privilege. Costco's current price-to-earnings ratio is a whopping 34.4 times earnings vs. Walmart's 25.3 times earnings.

Nevertheless, in these dynamic times in retail, investors should stick with the more resilient business model. While Walmart's management is doing a commendable job in adapting to the times, Costco remains the pick for me, despite its higher valuation.