E-commerce revenue has risen over the years and now accounts for roughly one-fifth of all retail sales (excluding restaurants, cars, and gas) in this country. And according to a new report from UBS, approximately 80,000 stores are expected to close in the U.S. over the next five years. In short, the retail industry is going through a major upheaval with lasting consequences. 

The poster child of this secular trend is Amazon, whose business has boomed by providing customers with low prices, more convenience, and greater choices, serving a multitude of product categories.

Traditional retailers are all too familiar with this information, but there are some companies that are doing just fine. In fact, they're actually thriving in this digital environment. 

Costco Wholesale (COST -0.24%) is doing it by offering a differentiated shopping experience. Home Depot (HD 0.74%), on the other hand, is insulated from the retail apocalypse due to its unique products and customers. 

Physical commerce isn't dead, especially for these two large-cap stocks. 

"store closing" sign in the window

Image source: Getty Images.

Selling items at the lowest prices possible 

For a $60 annual membership fee, Costco shoppers gain access to high-quality goods sold at extremely low prices. The fact that Costco sells such a wide assortment of items, from consumer electronics and sporting goods to groceries and health and beauty, benefited it greatly during the pandemic. Consumers viewed it as a one-stop shop for all their needs. 

This resulted in mid-teens revenue growth over the last three quarters. But as vaccinations rise and states slowly reopen, Costco demonstrates its resilience. Same-store sales (comps) during the five-week period ended April 4 rose 16% companywide, with e-commerce registering a 57.7% advancement. "It's approaching 10% of our business and continues to grow nicely," CFO Richard Galanti highlighted on the most recent earnings call. 

Don't be mistaken, though. People are obsessed with actually going to Costco. The company's strategy centers on sharing its scale advantages with customers. As Costco grows larger and purchases goods from vendors at lower costs, instead of choosing to raise its net income, it immediately passes these savings on to its shoppers. 

Costco's prices are generally lower than Amazon's, and the former's "treasure hunt" atmosphere of surprise deals incentivizes people to continue coming back to the store. This simply can't be replicated in an online-only environment. 

Yes, the pandemic brought a surge to Costco's business. However, I think the most important thing the warehouse club operator gained was higher consumer mind share. If they didn't already, people are increasingly learning just how valuable a Costco membership is. 

The membership renewal rate in the U.S. and Canada hit 91% last quarter. This, along with a still expanding store footprint, will drive growth for many years. 

Helping "doers get more done" 

Without the full ability to spend money on leisure, travel, and entertainment in 2020, consumers turned their attention to home improvement projects. This led to an increase in revenue and comps of 19.9% and 19.7%, respectively, for Home Depot in fiscal 2020 compared to the previous year. If we dig beneath the surface, we can see exactly why Home Depot has so far been protected from e-commerce competition. 

First of all, the company does have its own e-commerce operations. In 2017, a multiyear investment called the One Home Depot strategy was launched. The goal was to bolster the supply chain and to create a seamless, interconnected shopping experience. If last year is any indication, it's working. 

While digital sales jumped 86% year over year, what really stood out was the fact that 60% of online orders were actually fulfilled at a store. Home Depot's products are usually heavy and bulky, which keeps it safe from the likes of Amazon. 

Furthermore, the company is a project retailer, meaning that its customers require more hands-on and thorough service from sales associates. Professional customers fit this description the most. If a contractor is on the job site and realizes he or she is missing a mission-critical supply or piece of equipment, there is no time to order it online and wait for delivery. Making a trip to the closest Home Depot ensures that the project gets completed on time. 

Analysts are expecting a deceleration in growth this year, and management is still not comfortable providing financial guidance. Nonetheless, the largest home improvement retailer has shown that it's not going anywhere. 

Some final words 

Both Costco and Home Depot thrived during the pandemic. This alone should ease any investor concerns that the giant retailers are going to be negatively impacted by the retail apocalypse. At a time when consumers increasingly had the chance to adopt online shopping, they stuck with these two. 

In a tumultuous decade for brick-and-mortar businesses, Costco and Home Depot continue to shine. They're not scared of what's happening around them. Investors shouldn't be either.