Retail is emerging from its inflation slump, and most of the country's large retailers demonstrated important progress last year. Amazon (AMZN -0.28%) and Costco Wholesale (COST -0.90%), the two largest U.S. retailers behind first-place Walmart, ended the year with solid growth and equivalent stock gains. 

Let's see what each of these companies brings to the investing table and which one is the better buy today.

The case for Amazon: not just retail

Amazon is the largest e-commerce retailer in the U.S. It has higher sales than Costco, and it's still growing faster. It's also more profitable.

Company Sales Sales growth Net income
Amazon $158.9 b 11% $15.3 b
Costco $61 b 7.5% $1.8 b

Data source: Amazon and Costco quarterly reports. Amazon metrics are for the 2024 third quarter, and Costco metrics are for the fiscal 2025 first quarter.

Amazon accounts for around 40% of all U.S. e-commerce sales, a breathtaking lead that's unchallengeable in the near term. It's taking all kinds of actions to protect its position and become the source of even more of its loyal Prime members' shopping, like a new distribution network to keep products closer to customers and get them out faster. E-commerce remains Amazon's core business, and it's still growing. E-commerce is also increasing as a percentage of retail sales, expected to reach 41% of sales, up from 18% in 2017, according to the Boston Consulting Group.

But there's something else entirely that makes Amazon stand out right now, and that's generative artificial intelligence (AI). Really, it starts with Amazon Web Services, (AWS), Amazon's cloud computing business. AWS is growing faster than e-commerce, and it's a higher-margin business. In the third quarter, sales increased 19% year over year, accounting for 17% of sales, and 62% of operating income.

Many of the most valuable generative AI solutions are available to AWS customers, who can tap into all kinds of data and tools to create or benefit from AI. CEO Andy Jassy keeps saying things like it's a "once-in-a-lifetime type of opportunity," and that it's already a billion-dollar run rate business.

There could be many factors to add in Amazon's favor, but another important one is its growing advertising business, or better framed, its constant innovations that leads to new businesses and sales-generating opportunities.

The case for Costco: steady and reliable

You might say Costco is the very opposite of Amazon. As much as Amazon jumps from here to there, catching onto the flavor of the week, Costco is steadfast

That's not completely true; every company has to shift to meet changing needs, and Costco's doing a fabulous job at staying the course with what it does best while embracing new opportunities to create more value for shoppers and shareholders. It offers self-checkout counters for quicker shopping, and it's been experimenting with the best way to integrate e-commerce into its platform. For example, it offers store pickup for many items, a service Amazon can't offer. It also allows customers to check store inventory of many products. In the 2025 fiscal first quarter (ended Nov. 24), e-commerce sales increased 13% over last year. Traffic, order value, and conversion rates all increased year over year. 

Costco also releases monthly results, and e-commerce picked up even more, 34% year over year. Management says that was due to Thanksgiving-related sales happening a week later than last year, but it was a strong result nontheless.

But Costco is dependable because it has a reliable membership model that customers love. You might say that Costco's main business isn't selling products but selling memberships. Paid households increased 7.6% year over year to more than 77 million in the first quarter, and membership fee income increased 7.8% to $1.2 billion. Renewal rates were high, as usual, at 92.8% in the U.S. and Canada and 90.4% worldwide.

Costco also pays a dividend, which has a low yield of 0.48% at the current price. But it also pays an attractive special dividend occasionally that was $15 in 2023.

Which stock is the better buy?

Neither of these stocks is cheap, but Costco is more expensive, trading at a P/E ratio of 55 vs. 47 for Amazon. That makes it harder to call Costco a better value.

For most investors, Amazon is going to be the better buy. It's growing faster and has more opportunities. However, investors who are looking for a solid, reliable stock and passive income, like a retiree, might choose Costco instead.