Wal-Mart (NYSE:WMT) and Costco (NASDAQ:COST) are the top two U.S.-based retailers. Costco's annual sales total more than $100 billion, while Wal-Mart is closing in on $500 billion.

Discount Retailers Wal Mart Store Wmt

Wal-Mart is closing in on $500 billion in annual sales globally. Photo: The Motley Fool

But which of these iconic retailers is the better business? Let's take a closer look at how Wal-Mart and Costco match up along some important dimensions.

Sales growth
Prior to the Great Recession, Wal-Mart and Costco had similar revenue growth rates. However, consumer spending among lower-income Americans has never really bounced back from the credit crunch and the Great Recession. This has hit Wal-Mart hard.

By contrast, the average household income among Costco members is about $85,000. For the most part, Costco members aren't living from paycheck to paycheck. As a result, Costco quickly returned to strong growth following the Great Recession.

WMT Revenue (Annual YoY Growth) Chart

Wal-Mart vs. Costco Revenue Growth 2000-present, data by YCharts

Today, Costco routinely posts high single-digit revenue growth. Revenue grew 7.1% last year, and analysts expect slightly faster growth for the next two years. Meanwhile, Wal-Mart's revenue grew just 1.6% last year, and Wall Street analysts expect 2%-3% growth for the next two years.

Advantage: Costco

Store productivity
Sales per square foot is an important measure of how efficiently a retailer can use its real estate. The more a retailer can sell in a given amount of space, the more it can stretch fixed expenses like rent and utilities.

Last year, the Wal-Mart U.S. segment had a footprint of 659.1 million square feet and posted sales of $279.4 billion. That equates to sales per square foot of $424. Wal-Mart's Sam's Club division -- which has a business model similar to Costco's -- had 84.4 million square feet of space and sales of $57.2 billion, putting sales per square foot somewhat higher at $677.

Discount Retailers Costco Store Cost

Costco has a huge lead over Wal-Mart in store productivity. Photo: The Motley Fool

By contrast, Costco has 95.3 million square feet of warehouse space and generated sales of $110.2 billion. (This figure excludes membership fee income.) This works out to sales per square foot of $1,156. When it comes to maximizing sales volume in a store, Costco beats competitors like Wal-Mart by a country mile.

Advantage: Costco

Profit margin
Costco doesn't beat Wal-Mart in every category of retailer performance, though. Wal-Mart still has a higher profit margin than Costco. Wal-Mart's operating margin over the past year has been 5.53%: almost double Costco's 2.86% operating margin.

WMT Operating Margin (TTM) Chart

Wal-Mart vs. Costco Operating Margin (TTM), data by YCharts

For Costco, accepting a relatively low profit margin is the cost of driving high foot traffic and thereby maximizing revenue growth and sales per square foot.

Additionally, Costco's profit margin has been fairly stable over the past five to 10 years, while Wal-Mart has experienced some margin pressure recently. Still, Wal-Mart maintains a comfortable margin lead, and that's not likely to disappear anytime soon.

Advantage: Wal-Mart

E-commerce sales
As consumers turn to the Internet more and more often when shopping, every big retailer needs a solid e-commerce strategy. For Wal-Mart and Costco, e-commerce still represents a tiny proportion of overall sales, but it is a high-growth area. Wal-Mart and Costco are both investing in initiatives to boost e-commerce growth.

Last year, Wal-Mart's e-commerce sales grew about 30% to reach $10 billion. That represents about 2.1% of sales. Meanwhile, Costco's e-commerce revenue grew 18%-19%, falling just shy of $3 billion, or 2.7% of total sales. Thus, Costco's e-commerce operation is slightly larger as a percentage of total sales, but Wal-Mart's has been growing faster recently.

Advantage: tie

Two solid businesses, but Costco is the winner
Wal-Mart and Costco have both built up strong positions in the retail industry. Through their massive scale, they have developed cost advantages that few competitors can match.

Comparing the two, Costco has a huge lead in sales per square foot and significantly faster sales growth. Wal-Mart does have a better profit margin, but Costco has demonstrated over a long period of time that it can thrive despite its low margin structure. All in all, Costco looks like the better business today.

Adam Levine-Weinberg owns shares of Costco Wholesale. The Motley Fool recommends Costco Wholesale. The Motley Fool owns shares of Costco Wholesale. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.