Home Depot (HD 0.43%) is not a company that you'd think would fare well during a global pandemic, yet it has done just that and then some.

The home improvement chain's interconnected retail strategy is paramount to its success. "Investments we have made over the years in our stores, market-leading digital assets, flexible supply chain, and a world-class merchandising organization have allowed us to quickly adapt to shifts in customer needs, preferences, and behaviors," CEO Craig Menear said on the most recent earnings call.

pen following a rising chart with year 2020 listed

Image source: Getty Images.

Revenue in the first quarter of 2020 (ended May 3) rose 7.1% from the prior year period. Digital sales shot up 80%, and more than 60% of these orders resulted in a customer picking up the item in store. Home Depot's ability to adapt to a changing shopping environment stands out, and it will continue benefiting the company as some change in consumer behavior may be permanent.

Home Depot's focus during the onset of the health crisis was to take care of its associates and customers, and to serve its communities. While the company spent $850 million during the quarter to increase pay and support for employees, investors gained the most.

Those who timed the market bottom on March 20 and loaded up on Home Depot shares would be sitting on an unrealized gain of 81% as of Tuesday afternoon. Put another way, a $10,000 investment at that time would now be worth just over $18,000. That's an impressive return in less than five months.