The second quarter earnings season wasn't kind to Amazon.com (AMZN -1.54%) shareholders, with shares plunging about 7% the following day. After a boom year in 2020 amid the pandemic, it appears investors are less enthused with Amazon during the reopening, with the stock up just 3.7% on the year, versus a 19% gain for the S&P 500.

Though revenue grew a healthy 27.2% last quarter, that solid growth figure missed analyst expectations. Now that the reopening has begun, Amazon is seeing a deceleration in its core e-commerce offerings.

But while e-commerce is decelerating, Amazon's smaller but higher-profit segments are booming: Amazon Web Services (AWS) and digital advertising. In fact, if you strip out just those two segments, you could make a case that they are worth as much as Amazon's entire market cap right now; so even though e-commerce is slowing in the near-term, investors may be getting it pretty much for free.

A woman carries a huge gift thats bigger than she down a street.

Image source: Getty Images.

Cloud and digital advertising: high-growth, high margins

In the second quarter, AWS accelerated 37% to $14.8 billion, up from 32% growth in the first quarter and the highest growth rate since before the pandemic. AWS is Amazon's highest-margin segment -- at least the highest that it discloses, with operating margins coming in at 29.4% over the past 12 months.

Meanwhile, Amazon's "other" category, which consists mostly of digital advertising, surged a whopping 83% to over $7.9 billion. Amazon doesn't disclose the profit margin it makes on advertising; however, large-scale rivals Alphabet and Facebook garnered ad services margins of 39.1% and 43% last quarter, respectively. Given how close Amazon's ads are to making a purchase on its platform, It wouldn't be unreasonable to assume Amazon's digital ads business is just as profitable as these other platforms.

Looking at these two segments' current revenues, AWS is on a $60 billion run-rate, and advertising about a $32 billion run-rate. Assuming 30% operating margins for each (which is possibly conservative for ads), and these segments would generate about $18.5 billion and $10 billion in operating income, respectively; with a 20% tax rate, net profits would be $15 billion and $8 billion.

As stand-alone businesses, it would not be crazy to value AWS at, say, at least 50 times earnings or even more, especially with the 10-year treasury bond yielding around 1.3%. Given AWS' wide moat, the oligopolistic cloud infrastructure industry, and a clear decade of strong growth ahead of it, one could make the case of giving AWS the same earnings yield as no-growth U.S. treasuries, which would equate to a 77 PE ratio (100/1.3%). If one were to value AWS at 50 times run-rate earnings, that would make it worth $750 billion. At 75 times earnings, that would be a valuation of $1.125 billion.

Meanwhile, Amazon's advertising business would also garner a pretty hefty multiple, especially given its eye-popping 83% growth rate. Last quarter, both Alphabet and Facebook also reported strong ad growth of 68% and 56%, respectively. However, lapping the first quarter of COVID lockdowns tends to obscure things. Interestingly, prior to the pandemic, Amazon's ad business appeared to be on a stronger trajectory, logging 44% growth in Q1 2020, versus just 10.4% for Google and 17.6% from Facebook in that quarter.

Google and Facebook tend to trade at a high 20s or low 30s PE ratio, so it's not crazy to think Amazon's ad business could garner a 50 multiple or higher, given the higher-growth trajectory. If so, that could make Amazon's ad business worth $400 billion to $500 billion.

Amazon's $1.7 trillion valuation seems cheap in retrospect

If one applies these valuation multiples to AWS and advertising, it adds up to anywhere between $1.2 trillion and $1.6 trillion. Meanwhile, all of Amazon is valued at just under $1.7 trillion today.

The world's leading e-commerce platform, with its captive, expanding base of Prime subscribers, leading fulfillment capabilities for third party sellers, and one-day delivery capabilities, is probably worth a lot more than just $100-$200 billion. And let's not forget a number of other initiatives going on with grocery, cashier-less checkout, shipping for third parties, a growing pharmacy and healthcare business, and new technologies we probably don't even know about.

The bottom line is, after a year of pretty much doing nothing, Amazon's lagging stock is starting to look quite cheap again.