Online merchandising colossus Amazon.com Inc. (AMZN) may be trampling competitors left and right, but not the dominant global force in traditional retailing, Wal-Mart Stores Inc. (WMT). Indeed, Wal-Mart is Amazon's greatest threat, according to Ron Johnson, former CEO of JC Penney Co. Inc. (JCP), in an interview with CNBC. Moreover, with Wal-Mart's having eclipsed its major rivals in brick-and-mortar retailing, it's now "a two-horse" race between Wal-Mart and Amazon for overall retailing dominance, says Joseph Feldman, assistant director of research at Tesley Advisory Group (TAG), a brokerage, research and investment banking firm focused on the consumer sector, in remarks to Barron's.

In laying waste to the traditional landscape of brick-and-mortar storefronts, Amazon has become both the landlord and the anchor tenant of the leading virtual shopping mall. Smaller players increasingly feel compelled to set up shop there, paying Amazon for the privilege. Wal-Mart, meanwhile,  not only holds a key competitive advantage with its vast physical footprint, but it also is making increasingly successful forays into Amazon's online domain.

Fundamental Comparison

Wal-Mart has a year-to-date stock price gain of 43.9% through the close on November 17. Its forward P/E ratio is 21 and its P/E to growth (PEG) ratio is 3.89, per Thomson Reuters data reported by Yahoo Finance. The respective figures for much pricier Amazon are, respectively, 50.7%, 142 and 4.55.

Faster-growing companies tend to have higher P/E ratios, making them look relatively overpriced at first glance. The PEG ratio refines the analysis, dividing a company's P/E by its expected growth rate in EPS. Yahoo Finance uses EPS growth rate projections for the next five years in its calculations. The PEG figures cited above thus indicate that investors in Wal-Mart are paying less for growth than are investors in Amazon. Moreover, roughly 40% of Amazon's market value can be attributed to other ventures, most notably cloud computing, that are growing faster than its core retail business. (For more, see also: Amazon May Soon Become Market's "Trillion Dollar Bull".)

Meanwhile, per the same sources, Wal-Mart has delivered significantly better return on assets (ROA), 7.1%, and return on equity (ROE), 17.0%, over the trailing twelve months. The figures for Amazon are 2.8% and 9.7%.

Wal-Mart also is ahead in profit margin, 2.6%, and operating margin, 4.6%, for the trailing twelve months, again per the same sources. Amazon is half as profitable by these measures, at 1.3% and 2.3%.

WMT Chart

WMT data by YCharts

The Physical ​Advantage

The major advantage that Wal-Mart holds over Amazon, as Johnson tells CNBC, is its vast network of physical locations. Just considering the U.S. market, Wal-Mart's stores are in reasonably close proximity to most consumers nationwide, and these stores sell much of what is available through Amazon, he notes. Also, Wal-Mart has chosen to slow the rate at which it opens new stores, instead focusing on implementing new technologies to increase the efficiency of its distribution system, he adds. 

Amazon, meanwhile, is investing heavily in its own distribution centers, which Johnson says are more costly and less efficient than Wal-Mart's warehouses and stores. In fact, the huge storage and shelf space in the typical Wal-Mart store actually allows inventory to be "forward deployed" to where the customer is, "an advantage that is hard to beat," as he told CNBC. On the other hand, Amazon can tempt consumers with a much larger variety of items in each merchandise category than Wal-Mart feasibly can stock in its stores, even given their great size.

Big Third Quarter

Wal-Mart's 3Q 2017 revenues were up 4.2% year-over-year, per the company's press release. EPS for the quarter of $1.00 beat the consensus estimate of 97 cents by 3.1%. Total revenue of $123.2 billion beat the consensus estimate of $121.1 billion by 1.7%.

For Wal-Mart, e-commerce in the U.S. was a big contributor, with sales through Walmart.com up 50% year-over-year. By contrast, online sales growth at Amazon was 22%, the best in more than a year. Wal-Mart also had a strong second quarter in online sales, which were up by 63% from the prior year, per an earlier CNBC report. (For more, see also: Wal-Mart Has Strong US Sales Amid Retail Turmoil.

WMT Quarterly Actual EPS Chart

WMT Quarterly Actual EPS data by YCharts

Gaining Ground on Amazon's Turf

Wal-Mart also is proving to be a formidable adversary on Amazon's home turf, the realm of e-commerce, as indicated by the growth rates cited above. Here Wal-Mart's vast brick-and-mortar empire provides a key competitive advantage over Amazon, facilitating returns of merchandise ordered online. Moreover, Wal-Mart has made heavy investments in technology aimed at making in-store returns remarkably fast, at 30 seconds or less. Amazon, by contrast, is scrambling to play catch-up. (For more, see also: How Wal-Mart Is Beating Amazon At Its Own Game.)

In the fast-growing Chinese market, Wal-Mart has forged a formidable alliance against Amazon with giant online merchant JD.com Inc. (JD). Wal-Mart has gained a vast new sales outlet in JD.com. The latter, meanwhile, gets a brick-and-mortar presence by offering its own merchandise through Wal-Mart stores and using these stores as fulfillment centers, thereby pushing delivery times down to as little as 30 minutes. China already accounted for about 33% of Wal-Mart's non-U.S. sales. (For more, see also: Why Amazon Is Losing to JD.com and Wal-Mart.)

Amazon Projects Air Power

Amazon, meanwhile, is aggressively moving to enhance a key part of its value proposition, swift delivery to online buyers. It is engaged in several initiatives to speed up deliveries yet further, such as Amazon Seller Flex and Amazon Key. It also has invested in a fleet of "Prime Air" cargo jets. (For more, see also: FedEx, UPS Can Beat Amazon Delivery Entry: Goldman.)

Robot Wars

Amazon does have a clear advantage over Wal-Mart and other rivals in its extensive use of robots to cut costs and speed fulfillment times on orders. Wal-Mart, though, is not standing still. It also has been automating aggressively over the past several years, decreasing human staffing and redeploying remaining staff into higher value-added activities. For example, to increase its dominance in groceries, of which it is the largest seller in the U.S., Wal-Mart is expanding curbside pickup of online orders online. Wal-Mart also is engaged in a project with the Google division of Alphabet Inc. (GOOGL) to develop voice-activated shopping, a counterattack against Amazon's Alexa, CNBC reports. (For more, see also: Amazon vs. Wal-Mart: Who Is Winning the Robot Wars.)

Want to learn how to invest?

Get a free 10 week email series that will teach you how to start investing.

Delivered twice a week, straight to your inbox.