Of all the large-cap tech stocks, Amazon (AMZN -1.65%) is the most difficult to value. But when valuation is difficult, that's ironically when investors should try their hardest to value a company, since there could be a significant mispricing. 

A company's intrinsic value is the present value of all future cash flows. However, when a company intentionally spends all underlying profit in new growth areas, the "true" free-cash-flow margin is invisible.

That leaves investors guessing as to what Amazon's underlying profit margins could be if it tried to maximize profitability. Here's how investors should go about estimating it, and what Amazon is likely worth.

Why Amazon is so hard to value

The reason the company is so difficult to value is because it has a sprawling empire across e-commerce, cloud computing, digital advertising, streaming video, third-party shipping, and physical stores, along with a bunch of early-stage ventures across healthcare, satellite broadband, self-driving and electric cars, and other new technologies we likely don't even know about.

While Amazon has grown these franchises to over $500 billion in combined revenue, the company has generally aimed to operate around breakeven, funneling all corporate profits back into new business ideas.

AMZN Revenue (TTM) Chart

AMZN revenue (TTM) data by YCharts. TTM = trailing 12 months.

Amazon did start breaking out operating profits for Amazon Web Services (AWS) back in 2015. But while the company breaks out non-AWS revenue in a granular way, it doesn't break out the underlying profit of each division, instead grouping them all by geography between North America and international.

While Amazon has a lot of irons in the fire underneath the rest of its business, we do know that the vast majority of revenue is related to its retail operations, mostly in e-commerce, with a small share in physical stores.

While Amazon has first-party e-commerce, third-party marketplaces, physical stores, digital advertising, and streaming video, it's quite possible the company takes a lower margin on ads and streaming video than pure-play competitors -- which are typically high-margin businesses -- in order to undercut them on price.

Just as Costco (COST -0.12%) barely makes any money on its actual retail sales, deriving much of its profit from its membership subscriptions, Amazon likely does the same in its various retail segments. As its founder Jeff Bezos once said, "Your margin is my opportunity."

Therefore, it probably makes sense to look at the non-AWS parts of Amazon collectively as a pure retail business.

To me, there are two ways to estimate Amazon's underlying retail margin: by looking at margins of its closest retail competitors, as well as looking back at the brief period in Amazon's history when it tried to maximize margins.

How gross margins compare to Walmart, Target, and Costco

Thinking of Amazon as a retailer, we can compare its financial results to other large-scale U.S. retailers: Walmart (WMT 0.57%), Target (TGT -0.54%), and Costco.

But we're not looking at operating margins just yet, since Amazon reinvests all its gross margin into new ventures, with the bulk of that spending in research and development (R&D), which are operating expenses. Yet for tech firms, research and development costs are almost like capital expenditures to manufacturing and industrial businesses.

Amazon doesn't call it R&D, however, but rather "technology and content." Other cost categories include "cost of sales," "fulfillment," "sales and marketing," and "general and administrative."

Luckily for us trying to figure this all out, Amazon accounts for Amazon Web Services' costs of revenue within "technology and content" as well.

So if all AWS gross expenses are also within "technology and content," that leaves Amazon's "cost of sales" and "fulfillment expenses" as a pretty good estimate of its non-AWS gross costs. And wouldn't you know it? Amazon's gross margins on that basis look awfully close to its retail peers.

Last year was an extraordinary year of inflation and depressed consumer sales, but looking at the three-year averages for these four companies, here's how Amazon's numbers compare:

Company

Gross Margin (3-Year Average)

Operating Margin (3-Year Average)

Amazon (retail, estimated)

14.4%

?

Walmart

24.3%

4.2%

Target

26.8%

6.3%

Costco

10.9%

3.4%

Data source: Amazon, Walmart, Target, Costco annual reports. Chart by author.

Amazon's estimated gross retail margins sit between those of Walmart and Costco. You could therefore conclude that Amazon's operating margin also lies between those two as well, around 4%. On 2022 non-AWS revenue of $434 billion, that's around $17.4 billion in operating profit.

However, you could make an argument that Amazon's underlying operating margin is higher, if you think a mostly e-commerce operating model is more efficient than a store-based one. As you can see above, the smaller the store format, the less efficient the business is in terms of operating costs.

Target has more small-format stores, and has the biggest gap in between its gross and operating margin. Meanwhile, Costco has fewer but much larger warehouse superstores, with a lower operating-expense ratio and the smallest gap between gross and operating margins.

Based on that thesis, the fewer stores a retailer has, the more efficient the business model likely is. Since Amazon really doesn't have any stores (except Whole Foods and a few Amazon Fresh grocery stores), it's possible that there is an even smaller gap between retail gross and operating margins, which could mean its operating margin is higher.

If you applied Costco's 7.5-percentage-point gap between gross and operating margins to Amazon, that could mean Amazon's underlying retail margin is closer to 7%, not 4%. In that case, Amazon's underlying retail operating profit last year would have been closer to $30 billion.

Excited person opens a package.

Image source: Getty Images.

Looking into Amazon's profitable past of 2004

The second way to estimate what Amazon's retail margins could be to look into its past. Conveniently, back in 2004 -- before Amazon Web Services existed and while the company was a "pure" e-commerce retailer -- it tried to maximize profits in the wake of the dot-com bust.

Amid the pivot to profitability, Amazon continued to grow profits over 2003 and 2004, eventually achieving a 6.4% operating margin in 2004.

Wouldn't you know it? That looks awfully close to the estimate in the prior section, assuming that Amazon's mostly store-less footprint gives it an operating expense ratio close to Costco's.

Adding it up

Assuming a 6.4% operating profit, Amazon's non-AWS business could have an underlying operating profit around $27.7 billion. At a 25% tax rate, that equates to about $21 billion in net earnings.

Currently, Walmart trades at 32 times earnings, Target trades at 26.5 times earnings, and Costco trades at 34.6 times. Of note, Amazon's 6.4% non-AWS growth rate was nearly the same as Walmart's 6.7% growth in 2022. Of course, Amazon was also feeling a bigger reversal from the pandemic than Walmart, as it's an e-commerce operator first and foremost.

WMT PE Ratio Chart

WMT P/E ratio data by YCharts. P/E = price to earnings; YoY = year over year.

Applying Walmart's multiple to Amazon's estimated profits, Amazon's retail division would be worth $672 billion. Meanwhile, Amazon's entire market cap is $930 billion.

Considering that many think AWS is worth as much or even more than the retail business, and that there are other seed-stage businesses within Amazon that likely also have some positive value, the stock appears quite undervalued -- at least, based on these margin assumptions.