The home improvement retail industry has done extremely well in recent years, and companies have taken advantage of the rebound in the housing market to capture more business from homeowners and professional contracts. The Home Depot (NYSE:HD) has used its position as the leading big-box retailer in the home improvement area to create impressive growth, and Sherwin-Williams (NYSE:SHW) has used a combination of selling its paints, coatings, and other products through its own retail stores as well as through partnerships with other distribution outlets. Investors who are interested in the success of the industry want to know which stock is the better buy right now. Let's compare Home Depot and Sherwin-Williams on several important measures to see which one looks more favorable.

Home Depot's recent stock performance has outpaced Sherwin-Williams by a substantial margin. The big-box retailer has posted a 17% return since March 2015, while Sherwin-Williams weighs in at just 2%.

Yet when you look at the impact those disparate performances have had on valuation, it isn't as clear as you might think. Home Depot stock trades at a trailing earnings multiple of 24, which reflects in part the premium that investors have been willing to put on shares because of the company's growth. Sherwin-Williams, however, trades at an even higher multiple of 25 times trailing earnings.

Incorporating future growth expectations for earnings doesn't change the picture markedly. Sherwin-Williams' forward earnings multiple is just above 20, and that's greater than Home Depot's stock, which trades between 18 and 19 times forward earnings. The valuation disparity isn't all that significant, but it still gives Home Depot a slight edge.

From a dividend perspective, both Home Depot and Sherwin-Williams present a mixed picture. Both pay dividends, but neither has a particularly impressive yield. Home Depot leads the way with a 2.1% current yield, and Sherwin-Williams lags behind with its yield of 1.2%.

One perspective on the dividend issue is that both companies have plenty of capacity based on earnings to provide future increases if they choose. Sherwin-Williams pays less than a quarter of its earnings to shareholders through dividends. Home Depot's payout ratio is higher at slightly over 40%.

In addition, both Sherwin-Williams and Home Depot have track records of dividend growth. Home Depot has tripled its dividend since 2009, including its most recent 17% increase earlier this year. Sherwin-Williams has also made dramatic boosts recently, more than doubling its payout since 2012 and giving investors a 25% increase in early 2016. Sherwin-Williams also has the status of being a Dividend Aristocrat, having a 38-year streak of consecutive annual dividend increases.

Overall, Home Depot and Sherwin-Williams both have compelling features when it comes to dividends. A longer track record arguably makes up for smaller yield and leaves the two roughly even in this category.

Home Depot and Sherwin-Williams are both working hard to take full advantage of the current favorable environment in housing. Home Depot's most recent quarter included comparable-store sales growth of 8.9%, accelerating to its fastest pace in more than a year and easily topping its primary competitor in the industry. Profit margins continued to expand, and Home Depot enjoyed both increased traffic and higher spending from its customers. Efforts to expand its e-commerce channel have paid off for Home Depot, and the retailer expects to continue its efforts to cater both to its traditional do-it-yourself homeowner customer base and to the professional contractors who turn to Home Depot as a supplier.

Sherwin-Williams' recent results have also been encouraging, but its outlook isn't as clear. In its most recent quarter, Sherwin-Williams posted comparable-store sales growth of 5.1% at its retail stores, and even though overall sales inched up only 1.4%, net income soared by nearly 50%. Sherwin-Williams' global exposure held back some of its financial metrics, and its guidance for 2016 was somewhat disappointing. Since then, however, Sherwin-Williams' takeover bid for Valspar (NYSE:VAL) offers new avenues for the company to grow, and if the merger goes through, the combined entity will become the largest producer of paint and other coatings in the world in terms of revenue.

With a cheaper valuation, a higher dividend yield, and clearer growth prospects, Home Depot looks like the better buy for investors right now. However, Sherwin-Williams offers plenty of attractive attributes that some investors will find compelling as well.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.