Brick-and-mortar retailers Walmart (WMT 1.02%) and Costco (COST 0.84%) have thrived since the pandemic's onset. They gained an advantage when they were deemed essential and allowed to stay open while other stores were forced to close. Given the excellent performance of late, it's understandable investors would be attracted to Walmart and Costco. 

But what if you had to choose only one? Which retailer should you buy from, Walmart or Costco? Read below to find the answer to that excellent question. 

Costco has a reputation for value. 

Costco has gained widespread consumer loyalty because of its reputation for value. The membership warehouse store offers customers great value by carrying fewer SKUs and selling bulk packages. Additionally, as Costco attracts new customers who increase its revenue, it uses the scale to pass along even more value to customers. 

Indeed, Costco's revenue has grown from $105 billion in 2013 to $196 billion in 2021. Meanwhile, Costco's operating margin has only increased from 2.9% to 3.4% in that time. Instead, the company used greater purchasing power to deliver more excellent value. The positively reinforcing cycle has worked in its favor for decades with no end in sight. On the contrary, with inflation pinching consumer budgets, they could look to Costco even more to get more bang for their buck.

Costco makes up for the thin profit margins by selling inventory faster. That allows it to generate more profit overall even though it makes less from selling each item on average. 

COST Inventory Turnover (Annual) Chart.

COST Inventory Turnover (Annual) data by YCharts.

Walmart is the largest retailer in the world 

Walmart is content to sell items at higher profits at the expense of revenue growth. While Costco has grown revenue at a compound annual rate of 8.2% in the last decade, Walmart has managed just 2.5%. However, Walmart has consistently delivered an operating profit margin above Costco's and is doing so on a substantially more significant value of sales. Indeed, Walmart reported sales of $573 billion in its most recently completed fiscal year.

Moreover, Walmart has invested in an integrated omnichannel shopping experience. Walmart customers can shop online or in-store, have their items delivered to their homes, or come to the store to pick them up on the same day. Costco's e-commerce channel is not as well developed as Walmart's, partly intentionally. Costco sells products at lower margins, so it does not want the additional expense of shipping the items to consumers' homes. Frequently, Costco charges higher prices for customers who wish to buy a similar item online instead of in the store. 

Walmart's stock is cheaper than Costco's. 

COST PE Ratio Chart.

COST P/E Ratio data by YCharts.

Interestingly, Costco is selling at a premium valuation compared to Walmart. At a price-to-earnings ratio of 37 vs. 26 and a price-to-sales ratio of 0.96 vs. 0.59, Costco is considerably more expensive according to these metrics. 

The verdict: Costco has earned the premium 

Walmart and Costco are excellent retailers, but if you had to choose only one to buy right now, it should be Costco. Its selling strategy at lower margins at higher turnover is working to deliver better revenue and profit growth. The outperformance arguably justifies the stock's premium valuation.