Both Home Depot (NYSE:HD) and Amazon (NASDAQ:AMZN) are experiencing a surge in sales as a result of the COVID-19 pandemic. Each has benefited in unique ways: Amazon because people spent more online to reduce trips to the store, and Home Depot because it was deemed an essential business and allowed to keep its doors open during stay-at-home orders.

It isn't business as usual at Home Depot. It's increasing wages for most of its 400,000 employees and taking extra precautions to ensure the safety of its associates and customers. These changes are increasing expenses. Meanwhile, Amazon has been taking sales away from the entire brick-and-mortar industry. The e-commerce giant has partly driven the retail apocalypse. Still, Home Depot has Amazon beat in at least one area. 

A Home Depot storefront.

Image Source: Home Depot.

Home Depot's wide assortment of items carried in-store gives it an advantage 

The gotta-have-it-now nature of the products Home Depot sells protects the company from Amazon's encroachment on its business. For example, a toilet snake ordered from Amazon on a Saturday afternoon would arrive at my Los Angeles home on Monday at the earliest. Alternatively, I can drive over to Home Depot and walk out with the item in less than 30 minutes.

This is one advantage Amazon will have a difficult time overcoming. Amazon will need to make a substantial investment to get the product assortment you can find at Home Depot to your door in under an hour. The immediacy advantage is even more important for professionals, like a handyman working on your kitchen who finds that he needs a specific item to complete the job. 

Home Depot's $11 billion multiyear investment aims to improve on this competitive edge. The program seeks to strengthen the connection between what you see online and what you can get in stores. That will help enhance the company's success in inducing customers to buy online and pick up in stores -- a more profitable transaction for Home Depot than shipping. In the most recent quarter, 60% of online sales were picked up in-store. Maintaining and growing that percentage will be a crucial advantage against Amazon.

It will be interesting to see how evolving trends post-pandemic will impact Home Depot over the long term. Working from home and moving out of cities to rural areas are two ongoing trends. If the move to rural areas coincides with a shift from apartments to single-family homes, that will likely lift sales for Home Depot. Similarly, working from home will require some people to build out home offices or improve existing workspaces to increase their capabilities.

Wood stacked on shelves in the lumber aisle at Home Depot.

Image Source: Home Depot.

What this means for investors 

As of Tuesday's close, Home Depot's stock was selling at a price-to-earnings ratio just under 25. Typically, it trades in the range of 14 to 27. If you focus on valuation, this might not seem like a good time to buy. But personally, I'm usually willing to pay a higher multiple when interest rates are low. That's because the present values of the future cash flows are worth more when discounted at lower rates. And it helps that Home Depot can keep winning in a challenging time for retail.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.