Dow giants Wal-Mart (WMT -2.27%) and Home Depot (HD 0.78%) have each, in their own way, used the big-box retailing concept to devastate their competition over the years. Wal-Mart employs a focus on low prices to protect its dominant market share while Home Depot's product authority keeps it growing faster than national threats like Lowe's.

Judging by the gap in stock valuations, investors are far more optimistic about Home Depot's business today. Below, we'll look at why the home improvement giant looks like the better stock to buy right now.

Here are a few key statistics to get us started:

Metric

Wal-Mart 

Home Depot 

Market cap

$223 billion

$181 billion

Sales growth

1.4%

5.6%

Net profit margin

2.8%

8.4%

Dividend yield

2.8%

2.3%

Return on invested capital

15%

31%

Price-to-sales ratio

0.47

1.92

Price-to-earnings ratio

17

23

52-week price performance

(1%)

13%

Data sources: Company financial filings. Operating data is for the past complete fiscal year. 

Sales and profits

Home Depot wins the operating trends matchup across the board. Its nearly 6% jump in comparable-store sales growth last year was four times the 1.4% boost that Wal-Mart managed. The company is far more profitable, too, as it turned 8.4% of its sales into net income, compared to 2.8% for the retailing titan.

A shopper inspects lumber at a home improvement store.

Image source: Getty Images.

The most recent business results paint a similar picture, but suggest Wal-Mart may be gaining a slight edge in terms of momentum. Customer traffic improved by 1.4% in its U.S. locations last quarter to nearly match Home Depot's 1.6% uptick. Wal-Mart's traffic growth has been accelerating for two years whereas Home Depot's is headed in the other direction, falling from the 4% rate the retailer enjoyed in 2015 to 3% last year and now to below 2% so far in 2017.

Home Depot has more than made up for that decline through far higher spending per visit, and that's a big reason why the company is outgrowing its industry peers by a wide margin and soaking up market share. Wal-Mart can't say the same thing about its own growth pace.

Allocating capital 

Neither company is a slouch on capital allocation, and direct cash makes up a significant chunk of overall shareholder returns. Yet Home Depot comes out ahead in important ways here, too. Its 31% return on invested capital makes it one of the most efficient businesses on the entire market and is more than double Wal-Mart's result.

HD Return on Invested Capital (TTM) Chart

HD Return on Invested Capital (TTM) data by YCharts.

That gap has helped the company hike both share repurchase spending and dividend payouts at a faster pace, although Wal-Mart currently sports the fatter yield of almost 3%.

Valuation and outlook

Home Depot's recent stock price growth is likely a reflection of its brighter growth outlook. A wide range of metrics, including home prices, home improvement spending, and household formation rates all point to an above-average expansion rate for its industry. And, as the clear leader, it is well positioned to grab more than its fair share of those gains. Wal-Mart, on the other hand, is far more exposed to a broader retailing industry that's slowing as consumers move their shopping to online channels.

In exchange for that weaker outlook, investors are being quoted a sharp discount for Wal-Mart shares today. In fact, its price-to-earnings ratio of 17 makes it one of the cheapest on the Dow by that metric.

Thus, if your biggest concern is overpaying for a stock, you'll want to stay away from Home Depot, especially given the potential that its streak of market-thumping growth could come to a surprising end over the next few quarters. But if you're willing to pay a premium for businesses with stellar operating and financial trends, then Home Depot is the stock to buy today.