Home Depot (HD -0.68%) has been a winning stock for investors for a long time, returning 110% over the last five years. It is the leader in the home improvement industry, generating record-breaking sales of $132.1 billion in the recently ended fiscal 2020, much more than its rival, Lowe's. 

Even though it's widely known that Home Depot is an outstanding business, the stock has lagged the S&P 500 over the past six months. This seems like a dislocation to me, and signals that investors are being shortsighted by worrying about the business's prospects this fiscal year as stay-at-home restrictions are lifted and consumers will spend less money on their homes. 

But the long-term story for Home Depot remains intact, presenting investors with a buying opportunity.

Keyboard with key that says Buy stock

Image source: Getty Images.

Strength in the business

The company performed extremely well last year, with sales and net income jumping an impressive 19.9% and 14.4%, respectively. However, it is expected that Home Depot's growth in the current year will be quite paltry, as consumer spending shifts from home improvement projects to travel, entertainment, and anything else that was held off during the pandemic. 

Investors willing and able to look past the near-term weakness understand that the company is still in a great position to succeed for many years. Same-store sales (known as comparables, or comps in short) were already rising at a healthy clip for years before they skyrocketed nearly 20% last year. Transaction counts and average ticket size have also been trending upwards for some time, demonstrating that Home Depot was doing quite well before receiving a pandemic boost. 

Although the do-it-yourself (DIY) segment clearly shined throughout the past year, it's a positive sign that Home Depot's do-it-for-me (DIFM) segment had its best three-month period of fiscal 2020 in Q4, registering accelerated growth. It seems as though consumers with more complex and costly projects are comfortable with contractors being in their homes, and this continued strength in the DIFM business could offset any drop-off in DIY revenue in the coming quarters. 

Home Depot should also keep benefiting from its One Home Depot initiative, leaning heavily on investments made to bolster the supply chain and enhance the digital experience for shoppers. Digital sales rose 83% in the most recent quarter, with 55% of orders picked up at a store, proving that the interconnected retail strategy is working. 

And the recent purchase of HD Supply will expand Home Depot's capabilities in the maintenance, repair, and operations space, further propelling growth for many years to come. 

What about valuation?

Wall Street's intense focus on the next 12 months is probably why Home Depot's stock has trailed the broader stock market over the last year. Investors who have the patience to think long term are being presented with the opportunity to buy the stock at only 21 times next year's earnings.  

This is a bargain price for such a solid business that has grown, and will continue to grow, its sales and profit for a long time. Investing in stocks is the best way to build wealth, so when given the chance to purchase a stake in outstanding businesses, don't think twice. Buying Home Depot is that opportunity today.