The stock market, like pretty much every other asset class, is as frothy as ever.

The S&P 500 looks poised to cross the 4,000 milestone any day now and is trading at a price-to-earnings ratio of 40, nearly as high as it was at its peak during the dot-com era. Both recovery stocks and pandemic winners are looking dearly priced, as even stocks that were hit hard by the pandemic, like Macy's and Live Nation Entertainment, are trading above pre-pandemic levels. Pandemic winners like Wayfair, meanwhile, are also trading at all-time highs even as they face obvious headwinds as they lap a pandemic-fueled surge last year.

Value stocks, in other words, aren't easy to find. However, there's one retail stock that fits the classic definition of a value stock -- it's worth more than it's trading for. That's Walmart (WMT 0.38%). Based on conventional valuation metrics, Walmart certainly looks reasonably priced at a price-to-earnings ratio of 28, or a 30% discount to the S&P 500, but the real reason the stock looks like such a great value is that the sum-of-the-parts valuation looks much greater than its current market cap of around $375 billion.

The key components of Walmart's business are a brick-and-mortar retail empire anchoring the world's biggest company by revenue; a fast-growing e-commerce business that is the second-largest in the U.S. (behind Amazon); a warehouse club chain, Sam's Club, that is the second-biggest in the world (behind Costco); an international business being reoriented toward growth markets led by Flipkart and PhonePe in India; and, finally, emerging businesses in areas like healthcare, fintech, and advertising.

Let's take a look at how to value each of these businesses.

Walmart boxes on a conveyor belt

Image source: Walmart.

What is Walmart's e-commerce business worth?

Walmart doesn't cleanly separate its brick-and-mortar retail business from its e-commerce business, as the two often work together to provide an omnichannel experience with services like grocery pickup. But the company does give some clues about its e-commerce performance.

In fiscal 2021, which ended in January, Walmart U.S. recorded $43 billion in e-commerce revenue, while the international segment contributed $16 billion, and Sam's Club added another $5.3 billion for $64.3 billion in e-commerce revenue total, or about 11% of overall revenue. Walmart doesn't give profitability numbers on e-commerce. It has said the business operates at a loss, but that the loss is narrowing and should continue to do so. Growth in e-commerce has been strong, rising 62% last year, aided by the pandemic. The year before, total e-commerce sales grew by 58%, aided by the Flipkart acquisition.

There's no perfect peer to compare Walmart's numbers to, but Wayfair offers one analog. Revenue at the e-commerce home furnishings company jumped 55% last year to $14.1 billion thanks to pandemic-driven tailwinds. The company also turned profitable for the first time, posting net income of $185 million and adjusted EBITDA of $946.9 million. Wayfair will face difficult comparisons this year, as much of the spending on home furnishings has come from adjustments Americans needed to make during the pandemic, and those stay-at-home requirements will soon end. The company is valued at $35 billion, or a price-to-sales ratio of 2.5. Using that figure would give Walmart's e-commerce business a valuation of $160.8 billion, or nearly half of the company's market cap. Arguably, Walmart's e-commerce business should get a higher ratio than Wayfair. Even though Wayfair is profitable while Walmart e-commerce isn't, Walmart is growing faster than the home furnishings seller and isn't facing the same hangover this year, as demand for groceries -- Walmart's primary business -- isn't as sensitive to the pandemic as home goods are. 

Another useful comparison is to an earlier version of Amazon. The e-commerce giant finished 2013 with $74 billion in revenue, a small percentage of which was from Amazon Web Services, which was not a separate reporting segment at the time. That year, Amazon generated revenue growth of 22% and operating income of $745 million, showing it was growing slower than Walmart's e-commerce biz, but it was profitable. Amazon finished that year with a market cap of $183 billion. Extract a percentage of that market cap to account for AWS and you get a valuation equal to the $160 billion from using Wayfair as a model.

The entrance to a Sam's Club store

Image source: Sam's Club.

How Sam's Club compares to Costco

Sam's Club has long lagged behind Costco in the warehouse retail segment, but Sam's Club's recent results have been anything but shabby. Last year, aided by the pandemic, Sam's comparable sales excluding fuel and tobacco jumped 15.8%. Membership income increased 9.4%, and operating income jumped 16.1% to $1.9 billion. In the previous year, before the pandemic, Sam's comparable sales grew by a solid 3.8%, excluding fuel and tobacco. Direct comparisons with Costco are difficult because the two companies have different fiscal calendars, but in Costco's most recent quarter, comparable sales excluding fuel and currency exchange increased 12.9%, slower than Sam's Club's growth clip.

In its most recent fiscal year, Costco finished with revenue of $166.8 billion. Sam's Club, by comparison, recorded revenue of $63.9 billion, or 38% of Costco's total. Costco and Sam's Club have similar operating margins, at 3% for Sam's last year and 3.3% for Costco. Considering their similar growth rates and profit margins, it seems fair to apply a similar valuation to Sam's Club.

Costco has a recent market cap of $148 billion, which translates into a price-to-sales ratio of 0.83 based on its trailing four quarters of revenue. At that valuation, Sam's Club would be worth $53 billion based on its lower revenue.

A Walmart store in Mexico

Image source: Walmex.

Other businesses

Walmart's International business is difficult to value in the aggregate, as it's a diverse business segment. The company has rearranged its international portfolio significantly in the last three years, including by divesting from businesses in Brazil, Argentina, the U.K., and Japan as well as banking operations in Chile and Canada. It also acquired a majority stake in Flipkart. Outside of the U.S., it operates in Africa, Canada, Chile, China, Central America, India, and Mexico.

Walmart's biggest business outside the U.S. is in Mexico, where it has more than 2,600 stores. Walmex, its 71%-owned subsidiary, which is publicly traded in Mexico, owns its operations in Mexican and Central America and is valued at about $50 billion, making Walmart's stake worth about $35.5 billion.

In India, Flipkart recently said it was exploring going public through a SPAC valuing it at least $35 billion, according to Bloomberg, and PhonePe, the digital payments app that was spun off from Flipkart, is now valued at $5.5 billion. Since Walmart owns a 77% stake in both businesses, its combined stake is worth at least $31.2 billion, assuming Flipkart's $35 billion minimum valuation.

Walmart also owns a 5% stake in, the Chinese e-commerce company worth $130 billion, making Walmart's share worth $6.5 billion. From there, it gets difficult to value the remainder of Walmart's international operations.

In addition to the international segment, Walmart also has emerging businesses in areas like healthcare and advertising, and it just launched a fintech start-up. None of those businesses is large enough to have reportable metrics, but they could be significant in a few years.

What the math says

Based on the figures above, we have a $160 billion valuation for Walmart's e-commerce business, $53 billion for Sam's Club, and $73.2 billion for the international businesses that are valued above, which totals $286.2 billion, or roughly 75% of Walmart's market cap. There's some overlap there because the e-commerce valuation accounts for the global business, which includes Sam's Club and possibly subsidiaries like Flipkart, but that number seems to be a fair valuation for Walmart, excluding its brick-and-mortar Walmart U.S. business and most of its brick-and-mortar international business. Those businesses collectively represents the world's biggest retailer, and should represent the majority of its market value as that's the source of the vast majority of its revenue and profits.

Walmart seems like an obvious victim of the so-called conglomerate discount, meaning it's trading below the value of the sum of its parts. It's hard to know when Walmart's valuation will more closely resemble the true worth of the business, but it could happen soon. Flipkart's going public would be a step in the right direction, as would the continued growth of its e-commerce business and the emergence of segments like healthcare and advertising, which could cause the market to treat the company more like a growth stock.

One thing is clear. Walmart stock is trading significantly below its fair value.