Amazon (AMZN -2.56%) is one of the best-performing stocks of the past generation, but 2022 has mostly been a disaster for the tech giant. The stock is down 47% year to date, revenue growth has slowed to all-time lows, it's closed dozens of warehouses after overestimating demand, shuttered once-promising projects like Amazon Care, and just reported that it's laying off 10,000 corporate employees.

While it's clear Amazon has struggled this year, those challenges seem well-reflected in Amazon's stock price. Plenty of investors seem to think the stock could be a bargain right now, but is it really cheap? Let's investigate.

How to value Amazon

Amazon isn't an easy company to value. It's a combination of several businesses, including direct online retail, third-party e-commerce, advertising, cloud infrastructure, hardware and devices, a supermarket chain, and its Prime membership program that ties many of those segments together.

The stock has long traded at a high price-to-earnings valuation because investors have assumed it could be more profitable if it stopped investing so aggressively in future growth. Amazon's international business, for example, has historically been unprofitable, but that's because the company is investing in emerging growth markets like India. Its mature international markets, like the U.K. and Japan, are profitable.

Since Amazon's earnings are volatile and not entirely reflective of the business's strength, valuing the business based on its price-to-sales (P/S) ratio may make more sense.

AMZN PS Ratio Chart

AMZN PS Ratio data by YCharts. PS = price to sales.

As you can see from the chart above, Amazon is as cheap as it's been since 2015. Before then, the P/S ratio mostly ranged between 1.5 and three. But there's a reason it began to surge that year. That was when Amazon reported Amazon Web Services (AWS) as a separate business segment.

Investors bid Amazon stock higher in response, recognizing the potential of the cloud infrastructure. The stock more than doubled that year and nearly quadrupled over the following three years.

AMZN Chart

AMZN data by YCharts.

Since the first time it was reported as a separate business segment, AWS has grown from $1.56 billion in quarterly revenue with a 17% operating margin in Q1 2015 to $20.5 billion in revenue with an operating margin of 26.3%.

The sum of the parts

Since Amazon is primarily made up of an e-commerce business with high revenue and thin margins and a cloud infrastructure business with less revenue but wide margins, separately valuing the two businesses may make the most sense.

AWS is on track to bring in $80 billion in revenue and $23 billion in operating income this year, and sales grew 27% in its most recent quarter. AWS doesn't have pure-play peers, so there's no precise way to value it. Still, with that kind of growth rate and evident competitive advantages, a multiple of at least 30 times operating income, if not closer to 50, seems appropriate. That would value AWS between $690 billion and $1.15 billion.

Another way to value AWS is based on the P/S ratio. Cloud software stocks with similar top-line growth rates tend to trade at P/S multiples in the high single digits. At a P/S ratio between five and 10, AWS would be worth between $400 billion and $800 billion.

Now, let's look at Amazon's e-commerce business, which we can compare to other e-commerce companies. Since these businesses can vary from direct sales to third-party marketplaces to hybrids like Amazon, it's best to look at the gross merchandise volume (GMV), or total value of goods sold on the platform. The chart below shows how a few e-commerce stocks trade as a multiple of GMV for 2021.

Company Market Cap 2021 GMV Price/GMV
Etsy $14.3 billion $13.5 billion 1.06
Wayfair $3.6 billion $13.7 billion 0.26
Chewy $17.3 billion $8.9 billion 1.94
Farfetch 3.1 billion $4.2 billion 0.74

Data source: Yahoo! Finance and company filings. GMV = gross market value.

There's a fairly wide range among Amazon's e-commerce peers, and investors should keep in mind that e-commerce valuations are down right now since growth in the sector has slowed. Amazon doesn't report GMV, but Statista estimates it at $610 billion.

Considering that Amazon's e-commerce segment includes advertising, which is on track to bring in close to $40 billion in high-margin revenue this year, a price-to-GMV ratio of one (similar to Etsy) seems fair. That would value the e-commerce business at $610 billion. Or to be more conservative, we could measure this business based on a P/S multiple of one. That would give it a valuation of $400 billion since the e-commerce business is expected to bring in roughly $400 billion in revenue this year. 

Is Amazon stock a good buy?

Based on the numbers above, Amazon's fair valuation is anywhere from $800 billion to $1.76 trillion. (For comparison, Amazon's current market capitalization is around $1 trillion.) Additionally, Amazon's valuation multiples are likely to expand if its growth rate improves or its e-commerce business returns to profitability.

The good news for investors is that most of Amazon's challenges are temporary. Macro headwinds will eventually dissipate, e-commerce growth will resume, and the company will likely improve its cost structure. While a comeback in the stock may not be immediate, the shares look well-priced, and Amazon still has plenty of opportunity ahead to ramp up profit.