Image source: Getty Images.

Home Depot (HD 0.43%) is enjoying an epic growth streak. Thanks to years of improving customer traffic trends, the company is expanding faster than most national retailers -- and even trouncing its industry rival Lowe's (LOW -0.49%) -- in the key metrics of comparable store sales and profit gains.  

Home Depot has its weaknesses, though. In fact, it is lagging behind Lowe's in terms of physical expansion and is losing to online rivals like Amazon when it comes to e-commerce.

Store growth

Home Depot isn't planning to open a single new location in the U.S. in 2016, which will mark its fourth consecutive year of no physical store growth. In contrast, Lowe's plans to add 45 new locations to its footprint. Of course, its smaller rival has room to expand before potentially overtaking Home Depot in terms of physical presence. It boasts 202 million square feet of selling space, compared to 210 million square feet for Home Depot.  

The conservative strategy puts pressure on existing locations to deliver nearly all of Home Depot's sales gains. The good news for investors is that these warehouses haven't disappointed. Comparable-store sales spiked 6% higher last year -- on top of a 5% jump in 2014. Lowe's growth pace was a full percentage point lower in both years. The performance gap has continued into 2016, too, with comps running at a roughly 5% pace versus 4% for Lowe's.

While Home Depot loses an easy avenue for sales growth by not expanding its store base, it gains plenty of excess cash, which translates into significant cash returns to shareholders. Home Depot plans to spend $10 billion on stock repurchases and dividends this year, including investing almost $2 billion into the business on initiatives like store modernizations and building out its online infrastructure.

Online business

Home Depot posted 19% higher digital sales last quarter for a slowdown from the 22% pace it enjoyed in Q1. That figure was enough to put the home improvement giant ahead of peers like Target, which has spent years trying to build up a leadership position in digital selling. Despite that aggressive push, e-commerce still makes up less than 3% of Target's business, compared to 6% for Home Depot.

Home Depot's newest online fulfillment center. Image source: Home Depot.

However, Home Depot trails e-commerce focused rivals. Amazon's product sales, for example, spiked by 24% last quarter.

Home Depot is clear about the long term threat that Amazon and other rivals pose. "We face growing competition from online and multichannel retailers," executives explain in the 10-K, "some of whom may have a lower cost structure than ours, as our customers increasingly use computers, tablets, smartphones, and other mobile devices to shop online and compare prices and products."

Home Depot is spending heavily to fend off this threat. Its network of online fulfillment centers now covers over 90% of the U.S. for two-day delivery, for example. The company is also rolling out a national buy online, deliver from store offering to complement its popular buy online, pick up at store program. It now offers next-day delivery of bulk items like concrete and lumber to many of its pro customers. 

Executives hope these improvements will help it neutralize the cost advantages that online competitors enjoy so that the retailer doesn't see its dominant market position slowly slip away. An aggressive commitment to e-commerce has helped Home Depot defend its turf better than most of its bricks-and-mortar peers. But this is a long-term challenge that investors can expect to watch the company struggle with for years to come.