Walmart (NYSE: WMT) and Costco Wholesale (NASDAQ: COST) are two of the most dominant retailers in the world. In fact, they are the leading brick-and-mortar retailers in the world by revenue.
Both stocks have outperformed lately, shining in a challenging market for retailers as they've benefited from their strength in consumer staples and reputation for competitive prices. In the case of Costco and Walmart's Sam's Club, they also have the advantage of a membership model.
The chart below shows how the two stocks have performed over the last five years.
As you can see, both stocks have surged over the past year, but past performance doesn't determine future returns. Let's take a look at what each stock has to offer today to determine which is the better buy.

Image source: Getty Images.
Business model: Walmart vs. Costco
Walmart and Costco have similar business models, but there are also some important differences.
Walmart is primarily a conventional retailer. Its superstores sell a wide range of merchandise, though the company makes a majority of its revenue from groceries. Walmart is known for its "everyday low prices" model, which it pioneered. That low-price promise consistently brings customers in the door, as they know its prices will be competitive. Walmart's customer base tends to skew toward lower- and middle-income customers, and its U.S. stores are primarily in rural and suburban locations. In addition to its Walmart U.S. chain, the company operates in several other countries, and Sam's Club operates with a membership-based warehouse club.
Costco, on the other hand, operates with only one concept: It's purely a membership-based retailer. That's created an economic moat for the company as the membership fees and its quality merchandise at good prices help lock in customers. Costco has long ranked among the best retailers in customer satisfaction, thanks to its commitment to those characteristics that set it apart.
The retailer also has an unusually low gross margin, showing that it sells products at near cost and makes most of its money from membership fees.
Financials: Walmart vs. Costco
Both Walmart and Costco have delivered solid results of late, especially at a time when people are still struggling with inflation.
Walmart just reported another impressive quarter with 5.5% revenue growth to $169.6 billion, an improvement in gross margin, and a 14% increase in adjusted earnings per share to $0.58.
Walmart's investments in the omnichannel, and growth businesses like advertising and e-commerce, have paid off for the company. It's consistently beat estimates in its quarterly earnings reports.
Costco, meanwhile, delivered similar results in its fourth-quarter earnings report, with comparable sales excluding fuel and currency exchange up 5.9%. Revenue was up 1% to $78.2 billion as it lost a week in its fiscal calendar.
On the bottom line, its margins continue to expand. Earnings per share rose from $4.86 to $5.29, even with losing a week in the calendar.
Like Walmart, Costco has also found growth in e-commerce, which grew 16% in the fourth quarter. Unlike most retailers, Costco also continues to open new stores, a sign of ample whitespace for the company.
Valuation: Walmart vs. Costco
Walmart and Costco have both earned a premium valuation thanks to their recent success. Walmart now trades at a price-to-earnings (P/E) ratio of 38.4 and offers a 1% dividend yield.
Costco is also richly valued at a P/E of 59 and offers a dividend yield of 0.5%. The company also has a history of paying large special dividends every few years.
What's the better buy?
Both businesses are executing well right now, but both of these stocks are expensive, and look overvalued at their current P/E ratios.
Of the two companies, I'd rather own Costco. Its growth opportunity is more attractive since it's opening stores at a faster pace than Walmart, and has a more consistent track record of growth. However, I'd prefer to wait for a more attractive valuation to buy the stock.
Costco is the better buy, but the current valuation demands patience.
Should you invest $1,000 in Costco Wholesale right now?
Before you buy stock in Costco Wholesale, 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 Costco Wholesale 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 $889,433!*
Stock Advisor provides investors with an easy-to-follow blueprint for success, including guidance on building a portfolio, regular updates from analysts, and two new stock picks each month. The Stock Advisor service has more than quadrupled the return of S&P 500 since 2002*.
*Stock Advisor returns as of December 2, 2024
Jeremy Bowman has no position in any of the stocks mentioned. The Motley Fool has positions in and recommends Costco Wholesale and Walmart. The Motley Fool has a disclosure policy.
The views and opinions expressed herein are the views and opinions of the author and do not necessarily reflect those of Nasdaq, Inc.