The face of global retail has changed dramatically in the past 15 years, thanks in no small part to Amazon and its ability to catalyze the transition to e-commerce. But the two companies going head-to-head today -- Home Depot (NYSE:HD) and Target (NYSE:TGT) -- are not only still around, they've both produced market-beating returns over the past five years.

But between these two, which is more likely to survive and thrive in the age of e-commerce? Let's answer that question by comparing them on three different financial facets.

Vector illustration showing people ordering things online and having them delivered by drone.

In a future ruled by Amazon's drone delivery, which company will fare better? Image source: Getty Images

Financial fortitude

First, we need to know how well each company could withstand an economic crisis. While a crushing recession like the one we had in 2008-09 might be a once-in-a-generation event, there's nothing saying a recession can't happen again anytime.

If a recession does hit, between these two, which would fare better? We can evaluate that by looking at each company's cash, debt, and free cash flow levels.

Company Cash Debt Free Cash Flow
Home Depot $1.8 billion $25.8 billion $10.6 billion
Target $1.2 billion $11.1 billion $2.4 billion

Data source:Yahoo! Finance. Cash includes long- and short-term investments. Free cash flow presented on trailing-12-month basis. 

Both of these companies have comparable balance sheets: a modest sum of cash, heavy debt loads, and healthy free cash flow. This is standard for most retailers, as the costs to build out and maintain a network of brick-and-mortar locations -- and logistics -- is expensive. 

And while Target's free cash flow may be dwarfed by Home Depot's, the company's market cap is also much smaller than Home Depot's. Taken together, both of these companies would be in a pinch during a recession, but thanks to the ability to cut costs and maintain positive cash flow, neither would suffer more or less than the other.

Winner = Tie


Next, we have valuation. This can be a complicated comparison with no clear-cut answers. That's why I like to consult a number of different variables when deciding if one stock is "cheaper" than another.

Company P/E Ratio P/FCF Ratio PEG Ratio P/S Ratio Dividend FCF Payout Ratio
Home Depot 19 20 2.0 1.9 2.7% 44%
Target 13 15 1.3 0.5 3.3% 54%

Data sources: Yahoo! Finance and E*Trade. 

On just about every metric, Target is the cheaper stock. Even when considering growth prospects (PEG), Target is priced at a 35% discount relative to Home Depot. Plus, the company has a higher dividend yield and its payout is very sustainable.

Winner = Target

Sustainable competitive advantages

Now, we get to the most important variable worth investigating: sustainable competitive advantages. In the investing world, this is also referred to as a company's moat.

Both of these companies benefit from low-cost production and brand value. Let's unpack those two: Target can procure goods from manufacturers at less cost than a mom-and-pop store thanks to its scale. These manufacturers are willing to give discounts to have their products on Target's shelves. 

The same can be said for Home Depot. The only difference is that its goods are typically lumber, tools, and other pieces of home infrastructure. Therefore, there's no huge difference between the two.

Next, we can investigate brand value. According to Forbes' 2019 list of America's most valuable brands, Home Depot comes in at No. 32 with a brand value of $18 billion. That's far ahead of its home improvement rival -- Lowe's -- which came in at No. 74 with about $9 billion in brand value.

Target, on the other hand, didn't even crack the top 100 list. Two of its rivals -- Walmart and Costco -- did. This gives Home Depot the clear upper hand.

Most importantly, however, Home Depot has a business that's much more resistant to the pressure coming from Amazon. Yes, Target just posted a much better-than-expected quarter, which sent the stock up. But in the long run, its brick-and-mortar stores are still a potential liability in the age of e-commerce. And it's far behind Amazon in that area.

When people want stuff to help them remodel their home, however, they are far more likely to visit an actual store -- like Home Depot's -- than order products or services online. That alone is enough for me to give the nod to Home Depot.

Winner = Home Depot

My winner is...

So there you have it. I'm not particularly impressed with either company's financial fortitude. And while Target might have a cheaper price tag today, Home Depot has a wider moat. When there's a tie like this, I always side with the wider-moat company. Today, that means Home Depot comes out ahead. 

That said, I'm not particularly bullish on either stock right now. Both companies have PEG ratios that indicate they aren't exactly underpriced stocks at the moment. Home Depot might fare better, but at 20 times free cash flow, I'm not confident it will be a market-beater moving forward. That's why I haven't given the company an outperform call on my CAPS profile.

If you're seeking reliable dividend income from a stalwart, however, Home Depot is well worth a look.

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.