Better Stock: Walmart Inc. (WMT) vs. Costco Wholesale Corporation (COST)

When it comes to retail, everyone is focused on what is doing and which industry will get disrupted next. That makes it easy to forget the fact that e-commerce still accounts for less than 10% of all retail purchases in the United States.

What accounts for the other 90%? Tons of retailers. But two of the biggest have the stocks that will be going head-to-head in today's competition: Costco (NASDAQ: COST) and Walmart (NYSE: WMT). Over the last five years, the membership-based model of Costco has helped the company's stock double the returns of Walmart.

Will Costco's outperformance continue? It's impossible to tell with certainty. But by examining the companies through three distinct lenses, we can get a better idea of which is the better buy at today's prices.

Sustainable competitive advantage

In the investing world, there's nothing more important to evaluate than the sustainable competitive advantages of companies that you want to own. These advantages are often referred to as a company's "moat."

In the simplest sense, a moat is the special something that keeps customers coming back for more -- year after year -- while holding the competition at bay for decades.

Both Walmart and Costco benefit from a crucial advantage of economies of scale: By having such a huge number of shoppers globally, with locations spread across North America and the globe, each company can bargain for lower prices from third-party vendors that it can then pass along to consumers.

But because both companies benefit from this, it's not much of a differentiator.

Costco also benefits from moderately high switching costs. Put simply, it's tough to find a better deal on food and "stuff" than what you can find at Costco. Membership fees -- which run $60 per year for a basic card -- made up 106% of the company's profit. In other words, the core business -- minus the membership fees -- ran at a loss last year, and it always has.

That's a tough business model to beat. Under normal circumstances, I would argue that this gives Costco the edge. But recently, Walmart has been able to leverage its physical locations in North America impressively in upping its e-commerce game. Sales from the channel -- catalyzed by the acquisition of -- have given Walmart another avenue for growth. While it seems like that growth may be stalling right now, the sheer number of the company's physical locations give it an advantage in terms of expanding e-commerce presence and ease of delivery.

Winner = Tie.

Financial fortitude

Next, we have financial fortitude. While most investors in behemoths like Walmart and Costco would like to see excess cash returned to them via share buybacks or dividend payments, there's something to be said for keeping a boring pile of cash on hand.

That's because every company, at one point or another, is going to face difficult economic times. Those that have cash on hand can actually get stronger because of it -- by buying back shares on the cheap, acquiring disruptive upstarts, or bleeding the competition dry by undercutting prices to gain long-term market share.

Keeping in mind that Walmart is valued at almost four times Costco, here's how the two stack up.

Relative to their sizes, both companies have comparable free cash flows. But when it comes to the balance sheet, Costco is in a position to benefit more in the case of an economic downturn than Walmart. As such, Costco gets the nod here.

Winner = Costco.


Finally, we have valuation. Unfortunately, there's no one metric that will tell us if a company's stock is cheap or expensive. Instead, I find it best to consult a number of data points in building out a holistic picture.

Both companies have relatively small dividends that are very sustainable and have lots of room for growth. But in terms of earning and free cash flow ratios, Walmart is clearly the cheaper of the two choices.

Winner = Walmart.

My winner is...

So based on these three criteria, we have a tie. Usually, when this is the case, I side with the company with the wider moat. Here again, however, we are stuck: Neither company is an upstart disrupter anymore. And given that their moats are equally wide, I believe that valuation should play an outsized role. Walmart is fairly valued in my opinion, while Costco seems a touch expensive.

My vote goes to Walmart.

10 stocks we like better than WalmartWhen investing geniuses David and Tom Gardner have a stock tip, it can pay to listen. After all, the newsletter they have run for over a decade, the Motley Fool Stock Advisor, has tripled the market.*

David and Tom just revealed what they believe are the ten best stocks for investors to buy right now... and Walmart wasn't one of them! That's right -- they think these 10 stocks are even better buys.

Click here to learn about these picks!

*Stock Advisor returns as of February 5, 2018The author(s) may have a position in any stocks mentioned.

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