Walmart vs. Costco: Which Is the Better "Recession-Proof" Stock to Buy Now?

Source Motley_fool

Key Points

  • Walmart and Costco are passing along value to their customers via a growing portfolio of products and services.

  • Their dividend yields are now less than 1%.

  • Both stocks are glaringly expensive.

  • 10 stocks we like better than Walmart ›

The major stock market indexes are hovering around all-time highs, but the economy is chock-full of cracks beneath the surface.

Higher gas prices are adding even more pressure on already strained consumers. The housing market is in a prolonged, multi-year slowdown. Wage growth isn't keeping up with the cost of living, and the labor market faces profound paradigm shifts driven by artificial intelligence (AI).

Will AI create the world's first trillionaire? Our team just released a report on the one little-known company, called an "Indispensable Monopoly" providing the critical technology Nvidia and Intel both need. Continue »

Here's why Walmart (NASDAQ: WMT) and Costco Wholesale (NASDAQ: COST) are two of the most "recession-proof" stocks out there, why they may appeal to risk-averse investors, and which is the better buy now.

Person on road, holding umbrella and looking at storm breaking over city skyline.

Image source: Getty Images.

Value is in vogue

Walmart and Costco have operating margins of just 4.2% and 3.8%, respectively -- meaning they are converting around just $0.04 of every dollar in sales into operating income. But both companies offset these low margins with massive sales volume, passing along value to customers by offering low prices through elite supply chains and efficient operations.

Walmart and Costco continue to control a greater portion of their shelf space through their private labels: Costco Wholesale's Kirkland Signature, Walmart's Great Value, and Sam's Club's Member's Mark. While name brands have to justify higher prices through quality guarantees and customer trust, private labels undercut them and deliver more value, which is exactly what folks looking to stretch their dollars are seeking.

Walmart and Costco have expanded far beyond their in-store experiences, with Walmart rapidly gaining ground in e-commerce through its Walmart+ home delivery subscription service. Walmart and Costco both offer tons of services, from fuel and auto care to pharmacy, health and wellness, and financial services. Since value is ingrained in both companies' brand messaging, Walmart and Costco have grown their top and bottom lines steadily, while many other retailers and consumer goods companies are experiencing revenue and margin declines.

Priced for perfection

Walmart and Costco are two of the most recession-proof businesses. The problem is that the market already recognizes their competitive advantages and has awarded both stocks with sky-high valuations. Walmart trades at 44.4 times trailing earnings and 41.5 times forward earnings, while Costco is even more expensive at 54.6 times trailing earnings and 51.1 times forward earnings.

Despite their slow-to-moderate growth rates, investors have gravitated toward both stocks in recent years. In fact, Walmart and Costco have nearly tripled in the last five years -- outperforming the red-hot tech sector, Nasdaq Composite, and S&P 500 while the consumer staples sector as a whole has broadly underperformed the major indexes.

COST Total Return Level Chart

COST Total Return Level data by YCharts.

There are far better buys than Walmart or Costco

Given their nose-bleed valuations, most investors are probably better off not buying either safe stock right now. But if I had to choose one, I'd go with Walmart.

The company is leveraging AI across its operations and customer experience, and there's every reason to believe Walmart can continue to become a better-run company by adopting new AI tools. Walmart also has a better dividend than Costco, with 53 consecutive years of increasing its payout.

While Costco yields just 0.6% compared to Walmart's 0.8%, Costco does occasionally (usually every three years or so) pay special dividends when it deems it has enough cash on its balance sheet to distribute to investors. In general, I'm not a fan of special dividends, because they defeat the purpose of generating scheduled passive income. At least with Walmart, I can count on the dividend gradually growing with time.

Walmart and Costco are two impeccable companies, but they are priced even more expensively than top-tier growth stocks like Nvidia, Broadcom, Alphabet, Meta Platforms, Amazon, Apple, and Microsoft. I'd take any of these names over Walmart and Costco in May.

Should you buy stock in Walmart right now?

Before you buy stock in Walmart, 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 Walmart wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.

Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $477,813!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,320,088!*

Now, it’s worth noting Stock Advisor’s total average return is 986% — a market-crushing outperformance compared to 208% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.

See the 10 stocks »

*Stock Advisor returns as of May 25, 2026.

Daniel Foelber has positions in Nvidia. The Motley Fool has positions in and recommends Alphabet, Amazon, Apple, Broadcom, Costco Wholesale, Meta Platforms, Microsoft, Nvidia, and Walmart. The Motley Fool has a disclosure policy.

Disclaimer: For information purposes only. Past performance is not indicative of future results.
goTop
quote