Home improvement retailer The Home Depot (HD -0.03%) recently whiffed on sales estimates when it reported its Q1 operating results. The stock has steadily inched toward the low end of its 52-week range.

The problem? Consumers appear tapped out. With inflation making it harder to get by, wallets are tightening. Home Depot's comparable store sales fell 4.6% year over year in the United States.

But the economy cycles, and a bull market will eventually come again. When it does, Home Depot could return to its market-beating ways. Here are three reasons to buy the stock before then.

#1. Home improvement spending isn't going anywhere

Housing is the most significant purchase most consumers make in their lives. Homes also can cost a lot of money to maintain, repair, and upgrade, making home improvement an enormous market opportunity projected to be worth $558 billion in 2022 in the U.S. alone.

Home Depot is America's largest home improvement retailer; its $157 billion in annual sales gives it about 28% market share. This size gives it pricing power with suppliers that most competitors can't match, contributing to the company's growth as local independent stores get squeezed out of the market over time. Homes also carry a lot of emotional value for many consumers, which makes home improvement a more resilient spending category.

HD Revenue (TTM) Chart

HD Revenue (TTM) data by YCharts

That's why investors shouldn't get too worked up over Home Depot's recent sales drop. It's coming off a hot consumer economy following the pandemic. Eventually, Home Depot's revenue growth should start back up again.

Home improvement is a recurring business; you repaint rooms, remodel, and build new homes, so growth should pick back up as the economy improves. Experts believe the industry will surpass $600 billion in the U.S. by 2025, adding more than $40 billion in incremental growth.

#2. The stock is priced well for long-term investors

Stock market valuations can often reflect short-term expectations, and that's seemingly the case with Home Depot. The company's slowing sales have cooled the stock, which trades at roughly 19 times its estimated 2023 earnings.

This is not only a solid discount below the stock's decade average, but doesn't give credit for Home Depot's likely resumption of growth as the economy eventually heats back up. Analysts believe Home Depot can grow earnings-per-share (EPS) by 11% on average over the next three to five years. That means EPS could hit $26 in five years, valuing the stock at $520 five years from now (assuming a P/E of 20), an 80% gain without factoring in dividends.

HD PE Ratio (Forward) Chart

HD PE Ratio (Forward) data by YCharts

There will probably be better-performing stocks over the next five years, but few offer the combination of growth and dependability that Home Depot can. Getting shares when they're on sale is a great way to set up potential market-beating returns.

#3. An unusually attractive dividend

Home Depot is an emerging dividend growth stock, considering the company's raised its dividend for 14 consecutive years. Dividend investors, who sometimes prioritize passive income from dividends instead of total stock returns, might want to pay close attention to Home Depot's dividend yield.

You can see below that continued dividend increases plus a sliding share price have created a situation where Home Depot is yielding 2.7%, its second-highest yield in the past decade. In other words, the stock offers you more passive income for your dollar than it usually does.

HD Dividend Yield Chart

HD Dividend Yield data by YCharts

The dividend is very safe, funded by a 67% cash dividend payout ratio. Investors can buy shares and reinvest the dividends while the stock remains undervalued against its historical average and wait for the company to rebound when consumer spending recovers.

Home Depot is far closer to a base hit than a home run swing, but you can have a fantastic investing career just by getting on base repeatedly. It doesn't always need to be complicated -- buy an excellent stock like Home Depot when it's cheap and let long-term earnings and dividend growth do all the work.