Retailing can be a brutal business. Profit margins are low, the competition is intense, and shifting consumer tastes mean a company must work constantly even just to maintain its market share.

Wal-Mart (WMT -1.75%) and Lowe's (LOW 1.49%) have both demonstrated they can succeed in that harsh environment. After all, the companies each boasts a streak of annual dividend raises that stretches out more than 40 years. But which is the better investment at today's prices? Here are a few key statistics to get us started.

Stock matchup: Wal-Mart and Lowe's

Metric

Wal-Mart

Lowe's

Market cap

$261 billion

$67 billion

Sales growth

1.4%

4%

Net profit margin

2.6%

5.5%

Dividend yield

2.3%

2%

Return on invested capital

11%

14%

Price to sales

0.56

1

Price to earnings

21x

23x

Sales growth is for existing locations and excludes fuel sales and exchange rate changes. Data sources: Company financial filings.

Lowe's has the wind at its back

Lowe's is enjoying far better industry dynamics. Home-improvement spending has roughly doubled since the wake of the financial crisis, and that surge is allowing both Lowe's and rival Home Depot (HD 0.86%) to post impressive growth. Its comparable-store sales were up 4% in each of the last three years. Wal-Mart's 1% gain last year, meanwhile, was driven by weakness in the broader retailing world and followed two straight years of flat results.

A home improvement customer inspects a piece of lumber.

Image source: Getty Images.

Faster growth has produced better earnings for Lowe's as its customers increasingly splurge for higher-margin upgrades to their homes. That explains why the company enjoys double Wal-Mart's profit margin today.

The home-improvement specialist believes there's plenty of room for more gains. Sure, that cyclical industry has been expanding for years, which raises the risk of a downturn. Yet key metrics, including the age of housing stock, the rate of new household formation, and the modest rate of overall spending suggest the rebound may be closer to the beginning than the end.

Wal-Mart's stronger market position

Wal-Mart's industry isn't nearly as strong today, with customer traffic declining across a broad range of retailers. The company, however, benefits hugely from its status as both the top dog and the value leader in the market. It uses that power to lean on suppliers and get them to lower prices, to name just one example.

That initiative is paying off for the retailer right now, given that it recently announced its 12th straight quarter of rising customer traffic even as competitors such as Target and Kroger ramp up price cuts. Lowe's, in contrast, consistently trails industry leader Home Depot on key growth and financial metrics, including customer traffic, profitability, and return on invested capital. 

Wal-Mart's massive global scale also make it easier to fund major investments into e-commerce. After pouring resources into the digital channel in the past few years, its online assortment just passed 67 million different products. Its e-commerce revenue jumped 60% last quarter as the channel accounted for about one-third of overall sales growth.

Why pick Wal-Mart over Lowe's

Lowe's is the more expensive stock, both on a price-to-earnings basis and with respect to sales. That valuation gap likely reflects its stronger profit outlook and the better opportunities for growth in the home-improvement market.

For my money, though, Wal-Mart is the better investment today. Yes, its sales growth is more modest. But the retailer's market share trends are improving even as Lowe's cedes more ground to Home Depot. That premium industry positioning, along with its expanding e-commerce platform, should help the retailer post market-beating profit gains over the long term, just as it has in the past. Especially in light of the valuation discount, I'd rather own this industry leader than a company that is struggling in the shadow of its larger, better-equipped competitor.