The showdown between Amazon.com (AMZN -2.37%) and Wal-Mart (WMT 0.64%) is a veritable clash of retail titans.

A perennial leader among the Fortune 500, Wal-Mart consistently generates the most revenue on planet Earth -- among publicly traded companies, at least. In fact, Wal-Mart's $482 billion in sales last year more than doubles the second-largest corporate giant on the list, ExxonMobil. However, Amazon has combined Wal-Mart's appetite for low prices with its uniquely innovative ability to become the retail giant for the digital age.

So, which is the better stock to own today: Amazon or Wal-Mart? In this article, both Amazon and Wal-Mart will go through a three-part analysis to get a better sense of which appears to be the better buy today.

Financial fortitude

Each with large finance departments, investors can safely assume that Amazon's and Wal-Mart's current capital structures are in place for a reason. To frame this discussions, here's a cursory snapshot into several of the most important liquidity and solvency metrics for each company.

Company Cash & Investments Debt Cash From Operations Current Ratio
Amazon $25.9 billion $7.7 billion $16.4 billion 1.0
Wal-Mart $6.8 billion $43.7 billion  $31.5 billion 0.8

Data sources: Amazon.com and Wal-Mart investor relations, Yahoo! Finance. Figures from Amazon's and Wal-Mart's FY 2016 10-K. Cash from Ops reflects the last 12 months reported.

Amazon's $18.2 billion positive net-cash balance clearly jumps out as markedly better than Wal-Mart's negative $36.9 billion in net debt. However, this isn't nearly as glaring an impediment as it might first appear thanks to Wal-Mart's gargantuan operating cash flow, which is roughly twice that of Amazon's. This narrows the difference between the two companies in my eyes, and the difference between their current ratio is negligible enough to not really factor into the discussion.

More importantly, both companies are well managed enough to the point they should be able to meet any and all financial obligations while also tapping credit markets to finance any interesting opportunities. That being said, Amazon's slightly more conservative financial structure earns it a win in this analysis of financial strength.

Winner: Amazon (slightly)

Durable competitive advantages

Though of course important differences exist between the two, Wal-Mart and Amazon are more similar to one another than they are different today. Wal-Mart is the world's largest retailer -- total sales topped $481 billion last year -- and its entire business revolves around selling all manner of goods to consumers worldwide. Amazon's business mix is only slightly more eclectic. Its AWS reporting segment accounted for about $12.2 billion (9%) of overall sales. The remaining $123 billion (91%) of Amazon's total sales largely reflect its e-commerce operations, although sales of quasi-retail services like its Prime free shipping and online streaming platform are included in that number.

The core difference between the two is the method of distribution. Wal-Mart is largely reliant on its brick-and-mortar network of over 11,695 stores, whereas Amazon's sales occur entirely online. Of the two, Amazon is far better aligned with the long-term trends taking place within the retail sector, and Wal-Mart finds itself moving as quickly as possible to catch up with Amazon in this regard.

A keyboard image with a shopping cart, connoting e-commerce.

Image source: Getty Images.

Wal-Mart remains far behind Amazon, though, in developing its e-commerce capabilities. Case in point: Amazon captured 38% of U.S. e-commerce sales during the 2016 holiday season, compared to just 2.6% for Wal-Mart, according to researcher Slice Intelligence. Wal-Mart has intensified its efforts to narrow the gap with Amazon, mostly notably through its acquisition of e-commerce start-up Jet.com last year. The steep $3.3 billion price was largely seen as an "acqu-hire" of Jet's CEO Marc Lore, one of the few to successfully compete head-to-head against Amazon with diapers.com, which Amazon eventually acquired in 2011 after trying to kill the company in a bare-knuckled price war.

All of this is to say that Amazon is currently beating Wal-Mart in the all-important e-commerce space. However, Wal-Mart has finally gotten serious and paid-up for the talent required to bring its own sales model into the 21st century. Given Wal-Mart's unmatched leverage with suppliers, the most likely outcome of the e-commerce arms race is that Amazon and Wal-Mart will end this generational growth story roughly as equals.

Winner: Tie

Valuation

Turning to their valuations, the multiples perfectly capture the difference in investor sentiment between Amazon and Wal-Mart. Here's a quick snapshot of three of the most commonly used valuation metrics for Amazon and Wal-Mart.

Company P/E Forward P/E EV/EBITDA
Amazon 182.6 71.7 36.2
Wal-Mart 16.6 16.0 7.8

Data sources: Amazon.com and Wal-Mart investor relations, Yahoo! Finance. 

Clearly, Amazon is likely to grow far faster than Wal-Mart in the coming years. However, with Wal-Mart's recent moves to narrow the talent gap between itself and Amazon -- the precursor to narrowing the actual business gap -- Wal-Mart's shares look far more compelling from a purely dollars-and-cents perspective. This one is pretty straightforward, although I like both companies' shares, for the record.

Winner: Wal-Mart

And the winner is...Amazon by a nose

All of this is to say that both Wal-Mart and Amazon are dominant, world-class companies. By way of metaphor, Amazon is the barbarian at the gate, storming the gates of an industry that Wal-Mart has dominated without equal for years. And even though Wal-Mart has finally gotten serious about e-commerce as well, Amazon's incredible ability to develop unique solutions to capture an ever greater share of the e-commerce world gives it a slight edge over Wal-Mart. Different stocks for companies at different stages of their corporate lifecycles, I like Amazon shares a bit more in this showdown of e-commerce titans.