Amazon and Costco are both major players in the consumer goods space.
Because of its massive cloud computing business, Amazon is more of a tech company than a retailer.
Global cloud computing sales are expected to climb to $2 trillion by 2030.
Amazon (NASDAQ: AMZN) and Costco Wholesale (NASDAQ: COST) are both well known as sellers of consumer goods, but when it comes to its bottom line, Amazon is much more of a tech company than a retailer. That's because Amazon also has cloud operations, chip design and production, and artificial intelligence (AI) infrastructure for other companies to utilize.
Given how much the AI trend has lifted many tech stocks over the last three years, it would be reasonable to assume that Amazon would have been a better-performing stock than Costco. That assumption proves to be correct, but anyone who invested $5,000 in both companies at the start of that period will probably find the difference between their two performances surprising.
Missed Nvidia in 2009? This Rare Signal Is Flashing Again. In 2009, a "Double Down" signal flashed for a little-known chipmaker called Nvidia. For the first time in years, that same "Total Conviction" signal is flashing for a company 1/100th the size of Nvidia. Continue »
Image source: The Motley Fool.
Let's start by looking at these two companies' adjusted closing prices on July 14, 2023.
|
Stock |
Adjusted Closing Price, July 14, 2023 |
|---|---|
|
Amazon |
$134.68 |
|
Costco |
$525.24 |
With fractional investing, a $5,000 investment on July 14, 2023, would get you around 37.1 shares of Amazon or 9.5 shares of Costco. Using the adjusted closing price on July 14, 2026, that initial investment in each company would be worth the following today:
It may seem surprising that the investment in Amazon would not have yielded much more than a stake in Costco. That's not a knock on Costco, as I like the company for its recession-resistant business model, loyal customer base, and dividend payout, as well as the special dividends it pays from time to time. That said, looking to the next three years, I'd still rather own Amazon.
Based on traditional valuation metrics, Amazon is currently cheaper than Costco. Amazon trades at a forward price-to-earnings (P/E) ratio of 29.2, while Costco's forward P/E is 41.1. That lower valuation, paired with the tech company's wider revenue growth opportunities, makes it look like a more favorable stock pick.
Amazon is the global leader in cloud computing infrastructure: Its Amazon Web Services (AWS) unit had a 28% market share as of the first quarter of 2026. Its next closest competitor was Microsoft, with its Azure platform accounting for 21% of the market.
AWS generated $128.7 billion in revenue in 2025, and those sales should increase further in the years ahead thanks to AI. According to Goldman Sachs Research, overall cloud computing sales are expected to climb to $2 trillion by 2030, with 10% to 15% of that spending attributable to generative AI.
Amazon is also developing its own custom AI accelerator chips, which can further strengthen AWS by helping it to meet the needs of its customers at lower costs.
With that all said, it's also true that Amazon and other hyperscalers are spending unprecedented amounts to build out their AI infrastructure. To keep investors happy, capex spending needs to eventually show signs that it's boosting margins, unlocking more revenue, or ideally, both. But if Amazon continues to lead the cloud market and eventually shows that its AI infrastructure spending is delivering the expected returns on investment, its stock could generously reward long-term shareholders.
Ever feel like you missed the boat in buying the most successful stocks? Then you’ll want to hear this.
On rare occasions, our expert team of analysts issues a “Double Down” stock recommendation for companies that they think are about to pop. If you’re worried you’ve already missed your chance to invest, now is the best time to buy before it’s too late. And the numbers speak for themselves:
Right now, we’re issuing “Double Down” alerts for three incredible companies, available when you join Stock Advisor, and there may not be another chance like this anytime soon.
See the 3 stocks »
*Stock Advisor returns as of July 16, 2026.
Jack Delaney has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Amazon, Costco Wholesale, and Goldman Sachs Group. The Motley Fool has a disclosure policy.