Retail is rough when there's inflation. Costco Wholesale (COST -0.43%) and Home Depot (HD 1.88%) are two of the largest retail chains in the U.S., and both are dealing with similar challenges. Not only are they facing incredibly tough comps to beat from high growth at the beginning of the pandemic, but inflation is making it even harder.

Yet, both of these are perpetually popular companies. Let's see what's doing with their businesses and decide which is the better buy today.

A history of excellence

Costco has demonstrated reliable sales and income growth for decades. Its membership model generates consistent sales and breeds loyalty, and the fees themselves account for a large portion of net income. Costco marks up product prices by razor-thin margins, leading to high volume, especially when customers are tightening their spending. 

Costco posted higher-than-usual growth for the first two years of the pandemic, maintaining mid-teens sales increases. But that growth has finally been coming down over the past two months. 

Home Depot has also grown steadily over the past several decades as the largest home improvement chain in the world with more than 2,300 stores. It heavily invested in an omnichannel network just prior to the onset of the pandemic and was prepared for a drastic shift to digital sales, sustaining high sales growth for several consecutive quarters. That growth has also come to a close in recent quarters.

Struggles in the present

Costco's double-digit growth decelerated to single digits, or 8.1% year over year, in 2023's fiscal first quarter (ended Nov. 20). That slipped further to 6.5% in Q2 although comparable sales came in at 5.7%, which is a slowdown but still impressive in this environment. While management has had to raise some prices to combat inflation, it's trying to maintain its low prices on many items that its members count on.

In what is perhaps a more accurate reflection of Costco's business, renewal rates were at an all-time high of more than 90% in Q2, and even higher in the U.S. and Canada. Fee income was more than $1 billion, up from $967 million last year, and card holders grew 7% year over year. 

Home Depot is also experiencing a deceleration after massive growth, as high as 32%, earlier in the pandemic. In 2022's fiscal fourth quarter (ended Jan. 29), it eked out a 0.3% increase in sales, while comps fell by the same amount. However, full-year comps growth just beat estimates at 3.1%, and earnings per share (EPS) increased from $15.53 to $16.69.

Management is guiding for sales and comps to be about flat in 2023 with a small decline in EPS. Not only is it dealing with inflation, but it's also facing a suppressed housing market, which impacts its sales as a home improvement retailer. 

Bright futures ahead

Costco has several avenues toward growth. The first is in its store count. It currently operates 851 stores globally and only 585 in the U.S. -- quite small considering how much it generates in annual sales. It opens around 25 units per year, giving it a long growth runway in new stores alone. Costco still doesn't have a store in every U.S. state.

On the international front, Costco recently opened its first store in China and already has three stores in that region, with plans for two more before the end of the fiscal year. This is clearly a huge market that it's just beginning to penetrate.

Costco also grows through increasing its membership, and management has confirmed that it will raise the fee at some point. It's just about the average amount of time it took for the last three fee raises, so that announcement could be coming soon.

Finally, executive membership, which costs double the standard membership and accounts for 73% of sales, continues to grow and add income.

Home Depot has less room for store growth as it's already well-situated throughout the U.S. But it does have many plans to generate more sales. Part of that comes from continuously upgrading its physical stores as well as its digital capabilities -- with each complementing the other.  

The retailer also typically grows along with the housing and home improvement markets, which typically expand most of the time.

Valuation and dividends

One very obvious difference between Costco and Home Depot stock is their valuations. Costco's price-to-earnings ratio is about double Home Depot's -- a substantial difference.

COST PE Ratio Chart

COST PE Ratio data by YCharts

However, Costco stock has gained triple the amount that Home Depot stock has over the past five years, which could justify its premium valuation.

When it comes to the dividend, Home Depot's stock yields 2.7% at the current price, while Costco's only yields 0.75%. Factoring that in, though, and Costco's stock has still gained more than double Home Depot's shares.

COST 5 Year Total Returns (Daily) Chart

COST 5 Year Total Returns (Daily) data by YCharts

So what's the verdict? All things considered, Costco has my vote. It's more essential to shoppers, it has a model that creates loyalty, and it has obvious growth potential. However, investors who are looking for a surefire dividend stock for income might choose Home Depot instead.