Wal-Mart (WMT -1.75%) and Home Depot (HD 0.86%) are two of the biggest names in American retail. One is the iconic big-box store, selling everything from clothing to food to electronics, while the other is the clear leader in home-improvement supplies. Both companies bring in the vast majority of their sales from domestic stores and have become fixtures of the national retail landscape, with thousands of locations across the country.

Today, as part of our Better Buy series, we size up each retailer to see which stock is the better choice.

Image Source: Wal-Mart. 

A new Wal-Mart

Times have changed at Wally World. Today's Wal-Mart is in the middle of a massive reboot to address challenges from Amazon.com and the rest of e-commerce as it transforms itself into the retail leader for the 21st century.

The world's largest retailer has spent billions on wage hikes each of the last two years, lifting its minimum wage to $10/hour from the national minimum wage of $7.25. It's increased training, reduced merchandise stock-outs, and improved its inventory management. 

It's also experimented with futuristic ideas like drone delivery and a self-driving shopping cart, and it's rolled out more than 400 kiosks in store parking lots nationwide to facilitate its new online grocery pick-up program. This summer, Wal-Mart completed its biggest acquisition ever in the U.S., buying Jet.com for $3.3 billion. It was also the largest price tag ever paid for a U.S. e-commerce company, a sign of Wal-Mart's intentions to challenge Amazon in the space.

There is evidence that Wal-Mart's moves have paid off. The company posted its best comparable sales growth in years, at 1.6% in its most recent quarter, and also reversed a two-year slide in e-commerce sales growth thanks in part to the online grocery program. Despite that momentum, Wal-Mart's earnings per share are still expected to fall about 5% this year due to the above investments, but management expects earnings per share to return to 5-10% growth by fiscal 2019 (calendar 2018.)

Image Source: Motley Fool. 

Building for the future

While Wal-Mart stock has been relatively flat over the last five years, Home Depot has been one of the best-performing stocks on the market, more than tripling during that time.

The home-improvement retailer has benefited from a strong housing recovery, Americans' spending more of their budget on home improvement, and a savvy strategy. Comparable sales have been in the mid-high single digits for several years, bucking a trend in the wider retail industry. Building materials stores in general have seen sales consistently climb, in part because they are not threatened by Amazon the way other retailers like Wal-Mart are.

In its most recent quarter, Home Depot saw comparable sales increase 4.7%, with U.S. comps up 5.4% and earnings per share up 14%. Since 2008, the company has resisted opening new stores, and its store count is roughly the same as it was eight years ago. Today, it's 2,275. 

Instead of spending on new stores, the company has invested that money in store improvements, an enhanced e-commerce platform, and returning capital to shareholders through share buybacks and dividends. Over the past five years, its dividend nearly tripled, and management reduced shares outstanding by 20%, meaning doubling net income has led to a 156% increase in earnings per share. 

Late last year, the company outlined goals for fiscal 2018 (calendar 2018), including annual compound sales growth of 4.7%, an operating margin of 14.5%, up from 13.3%, and return on invested capital of 35%. Reaching those goals would mean a 25% increase in operating income, which could mean 40% growth in earnings per share if buybacks continue at the same pace.

And the better buy is...

Both companies face potential challenges ahead. The success of Wal-Mart's turnaround strategy is not guaranteed, especially as Amazon continues to make its Prime membership more appealing, while Home Depot could see housing growth fade, especially if the Federal Reserve raises interest rates, which would lift mortgage rates.

On a P/E basis, Wal-Mart is the cheaper stock at 15.5, compared to 21.3 for Home Depot. Wal-Mart also offers a better dividend yield at 2.8% compared to Home Depot's 2.1%, but Home Depot's dividend has been growing much faster.

A good argument can be made for each stock here, but I'd go with Home Depot based on its track record, dividend growth, and strong comparable sales growth. Wal-Mart's turnaround may ultimately pay off for investors, but right now Home Depot looks like the safer bet.