The past few months haven't been particularly favorable to big-box retailers. Waning customer demand in the face of high inflation, coupled with a looming recession, is pressuring revenue growth. Heightened promotional activity to get rid of rising inventory stockpiles also hurts profitability. This is all happening as the important holiday shopping season gets under way.

Home Depot (HD -0.55%), whose business is actually performing quite well, hasn't been spared from the market's pessimism. With the stock off 25% from its peak (as of this writing), which was set in Dec. 2021, investors should take a closer look at buying Home Depot today.

The latest quarter

In its fiscal 2022 third quarter, Home Depot posted revenue of $38.9 billion, up 5.6% year over year, and diluted earnings per share (EPS) of $4.24, up 8.2%. Same-store sales, a closely watched metric for retailers, jumped 4.3%. The business beat Wall Street's expectations on both the top and bottom lines.

Unsurprisingly, an important theme for the quarter was how the current economic climate is impacting operations. "We are operating in a broad-based inflationary environment not seen in four decades while managing through constrained global supply chain conditions, all against a backdrop of monetary policy shifts intended to moderate demand," CFO Richard McPhail mentioned on the latest earnings call.

The company continues to register growth in a difficult environment. Both the DIY and Professional customer cohorts posted year-over-year gains. And while the number of transactions decreased 4.3%, the average ticket size was up 8.8%. Sales per square foot also increased 5.3%, another positive trend.

I see no evidence to suggest Home Depot's business won't do well over the next five years and beyond. Sure, it might be more tied to the ups and downs of the economy because of its importance to the U.S. housing market, but over time, the company has thrived. This isn't going to change.

"Despite near-term uncertainties, we believe the long-term underpinnings of demand for home improvement remain strong and that we are well-positioned to leverage our distinct competitive advantages to capitalize on compelling growth opportunities in our space," CEO Ted Decker said on the call.

Management kept guidance unchanged for the full fiscal year, forecasting same-store sales to rise 3.0% and diluted EPS to increase by a mid-single-digit percentage.

Competitive strengths

It's worth taking a step back to identify and appreciate Home Depot's competitive strengths. From a customer's perspective, the company provides significant value in terms of a wide selection of merchandise at low prices. Customers can go to mom-and-pop hardware stores, but their selections and pricing won't be favorable compared to Home Depot's. This results in a powerful brand for the business in the minds of customers.

With trailing-12-month revenue of $157.3 billion, Home Depot has tremendous scale advantages. This means the company's sheer size allows it to negotiate better terms with its 10,000-plus suppliers, leading to lower per-unit costs. And this situation translates to improved profitability. Between the third quarters of fiscal 2012 and fiscal 2022, Home Depot's operating margin expanded from 9.6% to 15.8%.

And lastly, Home Depot benefits from switching costs, at least when it comes to professional customers like contractors and electricians. Pros account for about half of the company's overall revenue, and they rely on Home Depot's network of 2,319 stores as mission-critical partners to provide the right tools, supplies, and expertise when needed. Pros are less likely to switch to another provider once a relationship has been established.

Current valuation

After falling 25% in 2022, Home Depot's stock sells for a price-to-earnings (P/E) multiple of 18.8. This valuation is not only 17% cheaper than Home Depot's 10-year average P/E, but it's currently lower than the S&P 500's as well.

The market usually doesn't offer discounts on high-quality, industry-leading businesses that are still delivering growth in this type of environment. Investors should pounce on the opportunity to buy Home Depot stock right now.