The stock prices for Apple (AAPL -0.35%) and Amazon (AMZN 3.43%) went in opposite directions on Aug. 4 after the companies released their latest earnings reports. Apple's stock sank 5% after its slower-than-expected iPhone sales overshadowed its top- and bottom-line beat for the third quarter of fiscal 2023, which ended on July 1.

Meanwhile, Amazon's stock price soared 8% after its second-quarter beat indicated its e-commerce and cloud businesses were recovering. So is it the right time to sell Apple and buy Amazon? Let's take a fresh look at both tech giants to decide. 

An investor looks at multiple trading screens.

Image source: Getty Images.

Why did Apple disappoint the market?

Apple has two soft spots: its dependence on the iPhone, which accounted for 53% of its revenue in the first nine months of fiscal 2023, and its heavy exposure to China, which accounted for a fifth of its global sales during the same period. The bears believe Apple's sales of iPhones will stall out as consumers upgrade their smartphones less frequently, and that it faces both competitive and supply chain challenges in China.

Apple's iPhone sales declined 2% year over year to $39.7 billion in the third quarter, which missed the consensus forecast of $39.9 billion. However, that slowdown was entirely caused by currency headwinds, which offset its record third-quarter iPhone sales in India and other overseas markets. On a constant-currency basis, Apple's iPhone sales actually rose year over year.

Meanwhile, Apple's Greater China revenue grew 8% year over year, accelerating from the region's 3% decline in the second quarter. As for the competition, Apple actually grew its market share year over year from 18% to 20% in China, according to Counterpoint Research, as all four of its top competitors -- Oppo, Vivo, Honor, and Xiaomi (XIACF 4.72%) -- experienced year-over-year declines. Therefore, China should remain a fertile market for Apple for the foreseeable future. 

The bulls will also point out that Apple's services revenue, which accounted for 21% of its top line in the first nine months of fiscal 2023, grew 8% year over year in the third quarter. It added 150 million subscriptions across all of its services over the past 12 months, and surpassed 1 billion paid subscriptions for the first time -- and the stickiness of those subscriptions should keep its customers locked into its hardware and prisoner-taking ecosystem.

Analysts expect Apple's revenue and earnings to both decline 2% in fiscal 2023, but the upcoming launch of the iPhone 15 and Vision Pro, its expansion into India and other emerging markets, and the monetization of its services should stabilize its business. That's why analysts expect its revenue and earnings to grow 7% and 10%, respectively, in fiscal 2024. Apple is still growing, but it also can't be considered a bargain at 28 times next year's earnings and 8 times next year's sales.

Why did Amazon impress the market?

Amazon's growth cooled off last year for two reasons. First, its post-pandemic slowdown in e-commerce sales was exacerbated by inflationary headwinds. Second, the macro headwinds curbed the growth of its cloud infrastructure platform Amazon Web Services (AWS) as large companies reined in their spending on big software upgrades.

AWS' slowdown was worrisome since Amazon usually subsidized the expansion of its lower-margin e-commerce business with its higher-margin cloud revenue. That's why the bulls rejoiced when Amazon's AWS revenue rose 12% year over year to $22.1 billion in the second quarter and exceeded analysts' expectations by $400 million.

AWS' better-than-expected growth, along with the expansion of its higher-margin advertising business and aggressive cost-cutting measures, enabled Amazon to more than double its operating profit to $7.7 billion during the quarter. That trickled down to a net profit of $6.7 billion, compared to its net loss of $2 billion a year earlier.

Amazon's e-commerce business has also been stabilizing as inflation cools off, and it continues to expand its higher-growth online grocery business. All of those improvements prompted Amazon to guide for 9%-13% year-over-year revenue growth in the third quarter, which would roughly match its 11% growth in the second quarter.

For the full year, analysts expect Amazon's revenue to rise 9% as it turns profitable again (its stake in Rivian Automotive (RIVN 6.10%) caused it to report a steep investment-related loss in 2022). But next year analysts expect Amazon's revenue and earnings to grow 12% and 62%, respectively, as the macro environment improves.

Amazon might not seem cheap at 54 times next year's earnings. But as an e-commerce and cloud company, Amazon is often valued by its sales instead of its earnings. By that measure, it looks dirt cheap at 2 times next year's sales.

The better buy: Amazon

I own both of these stocks, and I don't plan to sell them anytime soon. But if I had to pick one over the other right now, I'd buy more shares of Amazon, for three simple reasons: its core growth engines are stabilizing, it's growing faster, and its stock is cheaper. Apple might still be a good safe-haven play, but its current valuations could limit its upside potential.