From opening its first store in Arkansas in 1962Walmart (NYSE:WMT) has since become a colossus in the retail industry. Walmart's revenue in fiscal year 2020 totaled $524 billion, and over 2.2 million associates call it their employer. 

Walmart's stock is up 23% this year, an impressive feat given the S&P 500's gain of only 11%. The company has done quite well adjusting to a new shopping environment due to the coronavirus pandemic. Its e-commerce sales climbed 97% in the quarter that ended July 31, bolstered by the success of curbside pickup and same-day delivery via the nascent Walmart+ subscription service. Investors should be pleased with the recent results. 

However, the leader of the Fortune 500 will find it difficult to move the needle much going forward, a symptom of its sheer size. Consensus analyst estimates for sales figures forecast 1% to 2% growth in fiscal 2022 and 2023 following a paltry 4.5% advance this year. 

Walmart is a symbol of American capitalism, but Costco (NASDAQ:COST) is the better retail stock.

Store checkout station

Image source: Getty Images.

Numbers don't lie 

Over the past decade, Costco's revenue, operating income, and profit all grew at a higher compound annual growth rate (CAGR) than Walmart. In fact, Walmart's operating income is down compared to 10 years ago, while its net income is essentially flat. Costco, on the other hand, has expanded the top and bottom lines at 7.9% and 11.9% per year, respectively, since 2010. 

Walmart does have better margins than Costco, but this is completely by design. Richard Galanti, Costco's CFO, reiterated on the most recent earnings call that the priority "first and foremost is the lowest price on the greatest quality or quantity of goods." Costco instead makes most of its money from high-margin membership fees.

In its most recent quarter (second quarter 2021), Walmart opened zero new stores, signaling stalled unit growth. Costco actually expanded its footprint, adding eight net new locations in the 16-week period ended Aug. 30th. Costco simply has a longer runway ahead of it, which makes sense given that its store count is 7% of Walmart's total. 

Focus on the customer 

Costco shoppers must be members in order to visit its stores. This drives loyalty and engagement, and offers the business the opportunity to build a long-term relationship with shoppers. Its customers are a fervent group, which is a boon for Costco because they are more likely to share their excitement with others. Costco benefits significantly from word of mouth, which is the most effective marketing tool. 

Walmart's recent launch of its subscription service, Walmart+, plus its Sam's Club segment (a direct competitor to Costco) are both ways in which the company can rival Costco's membership model. Even so, it probably won't get even remotely close to that kind of obsession from its customers. 

Bottom line 

Costco's shares have risen 29% year to date, giving the company a market capitalization of $170 billion. This leading warehouse retailer possesses better financials, more room for growth, and passionate customers when compared to Walmart, so its price-to-earnings (P/E) ratio of 42 seems warranted given the quality of the business. 

Total sales in October were up 14.4% from the prior-year period, with e-commerce continuing its strong growth as it rose more than 90% from last yearCostco isn't slowing down this year, and it's the better retail stock. 

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.