Retail sales remained strong in 2024, but two companies stood out for their significant gains in market share over the last two years. Walmart(NYSE: WMT) and Costco(NASDAQ: COST) both saw even stronger sales growth than the rest of the industry, fueled by improvements in e-commerce and at the store level.
Investors certainly noticed, and sent both stocks flying higher. Shares of Walmart and Costco currently trade 81% and 98% higher than they did at the start of 2023, significantly outperforming the S&P 500 during that period.
With the recent pullback in stock prices, it may be tempting to pile into these two market leaders. While they may face headwinds from the current U.S. administration’s trade policies, both have significant competitive advantages that should endure over the long run. In fact, they could benefit if prices increase, as shoppers look for lower-cost options.
But there’s another retail giant that looks even more attractive than Walmart or Costco. Not only is the stock less expensive, it’s poised to grow earnings even faster.
Image source: Getty Images.
If there’s one driving force behind the stellar success of both Walmart and Costco, it’s their shifts to drive more online sales. Both saw U.S. e-commerce sales grow more than 20% year over year in their most recent quarters, supporting their strong same-store sales growth. Both are growing faster than the overall e-commerce market in the U.S., despite their size.
But neither one is catching up with the market leader, Amazon(NASDAQ: AMZN). While Amazon only grew its online store sales 8% and its third-party seller services 9% last quarter, it’s working from a much bigger base than anyone in the industry. As a result, Amazon actually managed to increase its share of e-commerce last year.
What’s more, it’s driving those results while improving profitability. Amazon’s North America segment produced an operating margin of 6.4% in 2024. That’s up from 4.2% in 2023 and negative 0.9% in 2022. In comparison, Walmart’s operating margin for Walmart U.S. was just 5.2%, and Costco’s operating margin over the last 12 months is 3.7%.
Amazon’s international segment is also showing signs of improved profitability. It went from consistently producing an operating loss to $3.8 billion in operating income last year.
There are two factors driving the improved profitability at Amazon.
First, it overhauled its logistics network to a regionalized model starting in 2023. The move made it less expensive and faster to move items from its warehouses to customers’ homes.
Second, Amazon has seen significant growth in its retail media advertising business and other digital ads. Ad sales have incredibly high margins, as they mostly represent incremental revenue on top of its existing business. Amazon’s ad sales grew 18% in the fourth quarter to $17.3 billion, representing a growing portion of its total revenue.
While Walmart and Costco worked to improve their operating margins in recent years, Amazon is making much faster and more promising progress while continuing to grow faster than either brick-and-mortar retailer.
But investors get something else with Amazon that they don’t get with either Costco or Walmart, and it could be worth even more than its retail operations.
Amazon also operates the largest public cloud platform in the world, Amazon Web Services (AWS). AWS generated more than $100 billion in revenue last year and produced an operating margin of 37%. Not only that, its profitability is improving as it scales thanks to strong demand for artificial intelligence infrastructure. AWS generated almost $40 billion in operating income last year, up 62% from 2023.
Importantly, it looks like that’s poised to continue growing. Management noted demand for compute continues to outstrip its supply. That should provide a long runway of continued growth in 2025, and support Amazon’s massive spending on data centers. The company spent $26.3 billion on capital expenditures in the fourth quarter, and CFO Brian Olsavsky said investors can expect a similar run rate throughout 2025. In other words, it’ll spend more than $100 billion, mostly on data centers, but also on supporting its retail logistics network and fulfillment capacity.
AWS should continue to be a significant growth driver for Amazon’s profits, overshadowing the excellent progress it’s making on the retail side. But despite the strong earnings growth Amazon’s producing, the market’s still offering the stock at a great price.
As of this writing, you can buy shares of Amazon for about 30 times forward earnings. Walmart trades for 32 times earnings, and Costco trades for a lofty 50 times forward earnings estimates.
One might argue all three are overpriced, trading for such rich valuations relative to the market. But Amazon’s stock looks extremely attractive at this current multiple. First of all, it’s growing earnings significantly faster than its retail peers. Amazon’s earnings per share are set to climb 15% this year, compared to 9% for Costco and 5% for Walmart.
Also, its current valuation, on a price-to-earnings basis, is at a historic low for the stock. In comparison, Costco recently traded for a historically high valuation, and Walmart is trading in the upper end of its valuation range as well.
Importantly, if you look out to 2026, when Amazon should benefit from the massive investments it’s making in AWS, analysts expect earnings growth to accelerate. The current consensus estimate calls for $7.59 per share, up 20% on top of this year’s 15% expected growth.
All this makes Amazon a far more appealing investment than either Walmart or Costco.
Before you buy stock in Amazon, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Amazon wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Nvidia made this list on April 15, 2005… if you invested $1,000 at the time of our recommendation, you’d have $721,394!*
Now, it’s worth notingStock Advisor’s total average return is839% — a market-crushing outperformance compared to164%for the S&P 500. Don’t miss out on the latest top 10 list, available when you joinStock Advisor.
John Mackey, former CEO of Whole Foods Market, an Amazon subsidiary, is a member of The Motley Fool’s board of directors. Adam Levy has positions in Amazon. The Motley Fool has positions in and recommends Amazon, Costco Wholesale, and Walmart. The Motley Fool has a disclosure policy.