We all know that Amazon is the 800-pound gorilla in online retail. But were you aware that Walmart is making serious strides of its own toward becoming an e-commerce force? It started with the $3 billion acquisition of Jet.com, a leading logistics provider for e-commerce. That has turned into a major growth catalyst for Walmart. 

While these two companies are often mentioned in the same sentence when discussing the retail industry, they aren't as often compared based on their stocks. Amazon, after all, is more of a growth stock. Walmart appeals to value investors

But today, we're comparing them anyway!

Man holding out a smartphone with a shopping cart icon suspended above it

Image source: Getty Images.

Of course, that's a question that's impossible to answer with certainty. But we can get a better idea for what we're buying if we evaluate these companies against one another on three key facets of their business.

Financial fortitude

The first question is simple: If a financial crisis were to hit tomorrow, how would this company be affected? Almost all companies would see their stocks fall in the short run. But in the long run, those with lots of cash on hand and strong free cash flow can actually get stronger.

"How?" you may ask. Well, they can buy back their own shares at a discount, acquire start-ups, or simply lower prices to the point where the competition is driven out of the market. Then, when the economy recovers, such companies have the entire industry to capture themselves.

Keeping in mind that Amazon is valued at two-and-a-half times the size of Walmart, here's how the two stack up.

Company Cash Debt Free Cash Flow
Amazon (AMZN 1.04%) $41 billion $23 billion $22 billion
Walmart (WMT 0.68%) $9 billion $44 billion $17 billion

Data source: Yahoo! Finance. Cash includes long and short-term investments. Free cash flow presented on trailing-12-month basis.

Here we have a clear winner: Amazon. Both of these companies have very strong free cash flow. And Walmart's debt load -- while large -- is very manageable given its free cash flow.

But if a crisis were to hit tomorrow, I believe Amazon's net cash position (cash minus debt) of $18 billion would be a huge boon. It would offer flexibility and the option of using the money to move into new industries that Walmart wouldn't have.

Winner = Amazon

Valuation

Next, we have valuation. This is a much more difficult metric to nail down. Unlike solid numbers like cash, debt, and free cash flow, valuation is driven in part by investor sentiment. That's short for: the emotions of folks when they hit the "buy" or "sell" button.

As such, this is much more imprecise. The best way to mitigate that factor is to consider multiple data points in figuring out which stock is "cheaper."

Company P/E P/FCF Dividend FCF Payout
Amazon 72 39 N/A N/A
Walmart 27 20 1.8% 36%

Data source: Yahoo! Finance

Here again we have a clear winner. But this time, it's Walmart. Based on earnings, Amazon is about three times more expensive; based on cash flow, it's twice as expensive as Walmart. And if you invest in Walmart, you get the added benefit of a modest and very sustainable dividend. No such payout is offered by Amazon.

Winner = Walmart

Sustainable competitive advantages

But we finish with the most important factor of all: evaluating each company's moat. In short, a moat is what keeps the competition at bay for years, allowing a company to compound the business it adds with each passing day.

Walmart's key moat comes from low-cost production and its brand value. Low-cost production is a simple feature of Walmart's scale. With over 11,000 locations globally, it is able to negotiate rock-bottom prices from suppliers. It is also able to spread out fixed costs over a much broader base, allowing Walmart to offer lower prices than most of the competition. In addition, Walmart's brand is rated as the 26th most valuable in the world by Forbes.

But as strong as those moats are, they don't come close to matching Amazon. It has four defensible moats:

  • Brand: The same Forbes publication ranks Amazon as the world's fourth most valuable brand.
  • Low-cost production: Amazon's network of hundreds of global fulfillment centers allows it to next-day ship packages for a lower internal cost than anyone else.
  • Network effects: Because Amazon's website is so popular, third-party merchants use Fulfillment by Amazon and list on the site. This draws in more users, creating a virtuous cycle.
  • High switching- costs: On the retail side, it would be impossible for people to switch away from Amazon Prime and find a better deal. On the cloud side, users of Amazon Web Services are highly reliant on the company to meet their technology needs. While it's not impossible to switch cloud providers, it is a pain to do.

As you can see, Amazon clearly has the upper hand.

Winner = Amazon

And my winner is...

So there you have it. While I'm impressed with the progress Walmart has made in its e-commerce ambitions, it still doesn't have a moat -- or financial fortitude -- to match Amazon.