Mega-retailer Home Depot (HD 0.55%) has fallen roughly 24% from its post-pandemic peak. The home improvement boom of 2020 and 2021 sent the stock soaring, but now a slowing housing market and inflation impacts on consumer spending have investors concerned. 

With potential economic challenges on the horizon, investors are rightly wondering if now is a good time to buy Home Depot stock or not. Let's take a closer look to see.

Built to last

Home Depot is the largest home improvement retailer in the world, having over 2,300 stores in all 50 states alongside Canada, Mexico, and three U.S. territories. A cooling housing market isn't great for a company that has direct ties to the housing industry. But it's also not as big of a cause for concern as many investors believe. 

Home Depot has been in operation for over 40 years and has seen its fair share of slow housing markets, the most recent being the Great Recession. The housing market was in shambles as millions of homes were foreclosed and nearly one in four homeowners was underwater.

It was a challenging time for Home Depot, but the company showed great resiliency. From 2007 to 2009, what was considered the peak of the recession, Home Depot's stock price fell 5% while the broader S&P 500 was down by over 25% during that same period. And current housing market conditions are nowhere near as bad today.

The company is facing other economic challenges now, including decades of high inflation and continued supply chain issues, but its latest earnings show that the company is still going strong. In the third quarter of 2022, Home Depot's revenue grew by 5.6% compared to last year, while diluted earnings per share rose by 8.2%. Its operating margin also increased slightly, a sign that the company is managing higher costs relating to supply chain issues and inflation while still growing sales.

Solid foundation

Professional tradesmen and do-it-yourself renters or homeowners are no longer its core customers. The company has a diverse product selection offering things like appliances, holiday decor, gardening, and storage or organization solutions, which allows it to appeal to a wide range of customers in every season.

Its last Halloween event produced record sales in its home decor department, and the company is optimistic about the coming holiday season. The company is continuing its gift program, which puts certain products into gift bundles that have proven profitable in the past.

It's also improving its services and offerings for its Pro members, which are mostly professional tradesmen. Considering the Pro Program makes up for over half of its revenues, improving the experience and offerings for this category can help sustain the company's growth in the coming quarters.

Home Depot is also in a healthy financial position. Even if conditions were to deteriorate further, it has enough cash to maintain its debt obligations and dividends in the near future and is generating around $10 billion in free cash flow. The company is currently trading around 2 times its sales, which is low for its historical price-to-sales range over the past five years. Also, its price-to-earnings ratio is roughly 19, which is just lower than the average for stocks within the S&P 500.

Being down 24% this year definitely means this high-quality stock is on sale compared to recent pricing. Long-term investors who are looking for reliability and a slightly higher-than-average dividend yield of 1.8% could benefit from investing in Home Depot today.