Amazon (AMZN -0.95%) and Walmart (WMT 0.13%) continue their battle for retail supremacy in the U.S. and other parts of the world. Amazon's emergence had once created fear among investors that it would dominate the retail scene. Amid this concern, Walmart has found a way to foster growth through a combined online and in-store presence -- but those improvements may not translate into gains for investors. Let's take a closer look to find out why.

Walmart's comeback

In the middle of the last decade, the rise of Amazon amid Walmart's stagnant sales left the company reeling. However, Walmart began its turnaround when Doug McMillon became its CEO in 2014. The purchase of and other e-retailers took Walmart online in earnest, allowing the company to build a competitive advantage on a combined in-store and online shopping experience.

Thanks to this offering, customers could shop online when they preferred and, if what they wanted was available at the store, could pick up items rather than waiting on deliveries. With more than 90% of Americans living within 10 miles of a Walmart, the company was uniquely positioned to make this work.

Man with mask using his laptop while holding a credit card.

Image source: Getty Images

Such improvements continue to drive growth. In the latest fiscal year, revenue increased by almost 7% from year-ago levels to about $559.2 billion. This includes a 79% surge in U.S. e-commerce-based comparable sales over the same period, though the company did not release an actual dollar figure for those sales.

These gains helped operating income rise by nearly 10% to about $22.5 billion. Unfortunately, Walmart's tax burden increased by almost $2 billion during the fiscal year. The company took a tax hit that reduced net income by more than 9% to about $13.5 billion. Also, Walmart's income before taxes increased by just over 2%, as other gains fell from just under $2 billion to around $210 million over the course of the year. The sale of Walmart Argentina explains most of the increased taxes and the reduction in other gains.

The overall growth figures may have left some investors indifferent toward Walmart. After the P/E ratio spiked as high as 60 in 2019, it has fallen back to the 20 range, slightly above its multiple in the middle of the last decade.

Why Amazon could still hold the advantage

In contrast, Amazon shows no signs of stagnation. It continues to manifest most of its growth through its core competency of online retailing. Total net product sales increased by 37% over the previous fiscal year to just under $341 billion.

Nonetheless, Walmart remains ahead on operating margins. Amazon's $9.4 billion in operating income from product sales fell short of Walmart's $22.5 billion.

Still, Amazon has an ace in the hole in its cloud computing business, Amazon Web Services (AWS). AWS brings in substantially higher margins and profits than its retailing arm. Despite net sales of about $45.4 billion, AWS earned $13.5 billion in operating income.

This provides Amazon with a tremendous competitive advantage. For one, few retailers have skillsets that can transfer into a viable cloud computing business. More importantly, AWS makes Amazon less dependent on retail, a business with traditionally thin margins. Hence, AWS can subsidize retailing, allowing Amazon to gain a competitive advantage over Walmart and other peers. 

Thanks in large part to this advantage, Amazon generated close to $386.1 billion in overall net sales in fiscal 2020, an increase of 38% year-over-year. This helped net income rise 84% over the same period to $21.3 billion, or $41.83 per diluted share. Much of this increase came from the "other income" category, which increased by more than tenfold over the previous 12 months to over $2.3 billion. Changes in equity valuations and foreign currency drove the increase in other income.

Such growth continues to keep Amazon's valuation at a higher level. Its P/E ratio now stands just below 80, which seems to make Amazon's stock so expensive in the minds of some investors. Though this still dramatically exceeds the multiples for Walmart, Target and Costco, the P/E ratio has come down from last fall's levels, when it often surged above 120.

Amazon or Walmart?

In the retailing realm, Amazon and Walmart have fostered growth by combining online and physical store retailing. However, Amazon registers four times as much overall revenue growth as Walmart. Moreover, for all of the accolades about Walmart's e-commerce growth, the company remains unwilling to publish specific revenue numbers for this segment, suggesting that e-commerce still makes up a relatively small portion of its revenue.

Additionally, Amazon has found success with the separate business that is AWS, whose success lets the company pay for improvements that make its retail operation more competitive. This helps make Amazon a safer retail stock for investors, even when you consider its much higher valuation.