The home improvement sector has been a big winner on the stock market over the last decade.

Not only has a recovery in the housing market lifted the industry, but low mortgage rates have encouraged home-buying and home renovations. Spending on home remodels has increased by about 7% in recent years, easily outpacing overall economic growth in the U.S.. 

Given the industry's performance, it's not surprising that both home improvement retailer extraordinaire Home Depot (HD 0.22%) and paint-and-coating giant Sherwin-Williams (SHW 1.08%) have outperformed the market recently. Check out the chart below.

HD Chart

HD data by YCharts

Home Depot and Sherwin-Williams have tracked nearly perfectly with each other over the last five years, but that parity probably won't last forever. After all, these are two unique companies. Let's take a look at where each stock stands today to determine which is the better buy.

A Home Depot employee in a store aisle

Image source: Home Depot.

The home improvement leader

Though the market hasn't always been kind to retailers in recent years, Home Depot has been one of the exceptions. The company has delivered steady growth and executed on its strategy of investing in store improvements, new technology, and e-commerce rather than opening new stores. In fact, Home Depot essentially stopped opening new stores a decade ago, holding its count near 2,300, a move that has allowed it to ramp up profit margins and return capital to shareholders. It's also arguably one reason it has outperformed rival Lowe's, which has continued to open new stores. 

In its most recent quarter, comparable sales rose 3%, and the company expects the key metric to grow 4% over the year. It also sees modest earnings-per-share (EPS) growth of 3.1%, though it's losing a week in the fiscal calendar this year. Adjusting for that, EPS would increase about 5% this year. Through the first half of the year, EPS rose 6.1%, though the company expects decreasing lumber prices and tariffs to weigh on performance in the second half of the year. https://ir.homedepot.com/news-releases/2019/08-20-2019-110043066

Home Depot has delighted dividend investors in recent years with a series of generous hikes in its quarterly payout. Earlier this year, the company lifted its dividend a whopping 32% to $1.36 a quarter, which CEO Craig Menear called "a demonstration of confidence in the business going forward." Over the last five years, its dividend has nearly tripled, and the company now offers a well-funded dividend yield of 2.3%.

The retailer's shares are trading at a price-to-earnings ratio of 23, equivalent to the average stock in the S&P 500, which seems like a reasonable price for a solid and steadily growing retailer.

Several rows of paint cans

Image source: Getty Images.

Paint the world

Sherwin-Williams is more than just its namesake paint. The company owns several other well-known paint and coating brands, including Valspar, which it acquired in 2017, Krylon, Minwax, Thompson's Water Seal, and Cabot, among others. The company distributes its products through 4,900 company-owned stores as well as retail partners like Home Depot and online.

Sherwin-Williams has been around more than 150 years and is the No. 1 paint company in the U.S., and in the top three in the world.  The need for paints and coatings for homes and buildings isn't going anywhere, and neither is Sherwin-Williams. It's a good bet that the company and its vast array of brands will still be around in 150 years. Not only is it the domestic leader in paint sales, but its acquisition strategy means the company is likely to get bigger, by swallowing up rivals, and its formidable company-owned distribution network gives it an advantage over rivals like Berkshire Hathaway-owned Benjamin Moore and PPG Industries

For a company operating in a staid industry, Sherwin-Williams has seen solid growth of late. Comparable sales in its Americas segment, the company's biggest, jumped 8.1% in its latest quarter, and are up 5.5% through the first three quarters of the year, due to increased paint sales and higher prices. 

That growth has also helped lift profits. Management now expects adjusted earnings per share this year to increase from $18.53 a year ago to $20.90-$21.30, representing 12.8% to 14.9% growth. That's significantly better than Home Depot's growth rate this year. Sherwin-Williams is slightly more expensive than Home Depot, at a P/E of 28, and pays a dividend yield of 0.8%. It's increased its dividend every year since 1979, making it a Dividend Aristocrat.

Who's it going to be?

Both Home Depot and Sherwin-Williams have a lot going for them, including their ability to ride the growth in the home improvement and homebuilding industries. It's not a surprise that their performance has mirrored each other over the last 10 years, with both stocks appreciating nearly 10 times during that period.

Dividend investors will likely prefer Home Depot because of its superior yield and recent record of strong payout increases, but overall, Sherwin-Williams looks like the better buy. Though the paint specialist is slightly more expensive, it's growing significantly faster than Home Depot; it has a dominant position in paint and coatings manufacturing and supply, and its long history and portfolio of well-recognized brands should give investors some assurance of its staying power. In addition, Sherwin-Williams should be able to grow both organically and through acquisitions, while Home Depot is basically only aiming to grow through comparable sales increases. Finally, though Home Depot has a strong position in its industry, it seems more vulnerable to threats from e-commerce companies like Amazon

Both stocks could easily continue to beat the S&P 500, but I think Sherwin-Williams is more likely to be the biggest winner over the long run.