Ever since Amazon.com (AMZN -1.70%) came on the scene, it's been taking market share from competitors worldwide. By increasing the items available on its site, improving efficiency, offering convenience to customers through fast shipping, and keeping prices low, Amazon puts pressure on retailers to play its game or risk losing customers. As a result, Amazon is primarily taking the blame for starting the retail apocalypse, where several bricks-and-mortar retailers went out of business. 

Still, some retailers are keeping the behemoth at bay. One of them is Home Depot (HD 0.35%). Through a combination of size, speed, and the ability to sell big and bulky products that are difficult to ship, Home Depot has so far fended off Amazon from encroaching on its business. 

The exterior of a Home Depot store.

A typical Home Depot store is 105,000 square feet. Image source: Home Depot.

Size 

The home-improvement retailer offers a wide range of products for the do-it-yourself and professional customer. A typical Home Depot has a massive retail area of 105,000 square feet. However, it uses the space well -- carrying a broad inventory of big and bulky items that would be difficult and expensive to ship. For example, you can easily walk in and buy items such as large refrigerators or 12-by-12-foot plywood boards. Those items are expensive to ship and usually require a two-person team to deliver -- the usual FedEx or UPS truck has one person.

Admittedly, Home Depot's main competitor in the home improvement market Lowe's (LOW 1.28%) can claim this same size advantage. 

The logistical challenges for Amazon have kept it from taking market share from Home Depot and are proving to be long-lasting. 

A Home Depot associate stocking shelves.

Home Depot has 500,000 associates. Image source: Home Depot.

Speed 

In addition to big and bulky items, Home Depot carries plenty of items that, when you need them, you need them right now. If a contractor needs something while working at a client's house, or if your kid flushes a stuffed animal down the toilet, you're not going to wait two days for Amazon to deliver a tool or a toilet snake.  

That is an advantage that retailers like Macy's or Nordstrom can't claim. It's rarely the case that individuals will go to these stores for an item they need for immediate use. 

As fast as Amazon is getting at delivering items, it's going to be hard to match the speed of driving to your local Home Depot and picking up what you need on the spot. 

Investor takeaway

These are long-lasting competitive advantages that Home Depot has against Amazon. While other brick-and-mortar retailers will eventually succumb to the relentless pressure of Amazon, Home Depot isn't likely to be one of them. That's one less risk Home Depot shareholders should be concerned about.   

Over the past decade, Home Depot has grown revenue at a compound annual rate of 6.9%, and it should be able to sustain that level over the next decade as well. In addition, the stock is currently trading at a price-to-earnings ratio of 23, which is right around its historical average. Given its solid long-run prospects and a reasonable valuation, investors can feel comfortable adding Home Depot to their portfolios right now.