In the home-improvement retail space, Lowe's Companies (LOW -0.04%) usually takes a back seat to big brother The Home Depot (HD 0.94%) in the minds of investors. But Lowe's stock is up 115% over the last five years compared to just a 64% return for Home Depot, as of Aug. 23. Simply put, little brother is outperforming, and it's time for investors to take notice.

These two companies could both be resilient additions to any portfolio. And their financial results rarely diverge greatly. However, a hidden catalyst has made Lowe's stock perform better than Home Depot stock over the last five years, and it's worth exploring.

Here's where the two businesses are comparable

I love the home-improvement space. There's no need to overcomplicate this part of the investment thesis: People need places to live and will spend money to maintain and upgrade their spaces.

This makes the industry recession-resistant, as financial results from Lowe's and Home Depot illustrate. The chart below doesn't show a substantial hit to revenue during recessions (shaded) for either company.

LOW Revenue (Quarterly) Chart

LOW revenue (quarterly) data by YCharts.

Business trends for Home Depot and Lowe's don't tend to diverge much. Consider the most recent quarterly results for each company. 

In its fiscal 2022, sales for Home Depot rose 4.1% year over year and are expected to drop by 2% to 5% in its fiscal 2023. For Lowe's, its net sales increased about 1% last year and are expected to drop around 9% this year. On one hand, that points to slightly better results for Home Depot. On the other hand, financial results for these two companies are going in the same direction.

In fairness, Home Depot does outperform Lowe's by a mile when it comes to operating margin, as the chart below shows.

HD Operating Margin (TTM) Chart

HD operating margin (TTM) data by YCharts. TTM = trailing 12 months.

Home Depot has higher sales per location, which likely explains why its operating margin is so much higher than that of Lowe's. In 2022, Home Depot had $627.17 in sales per square foot of selling space. For its part, Lowe's doesn't provide a number. But based on its financials, it had closer to $500 per square foot.

When Home Depot executive Marvin Ellison joined Lowe's as CEO in 2018, I believed he could help bridge this gap in sales per location, perhaps by stimulating better success in the pro business. That hasn't happened yet. It remains an opportunity, but I digress.

The difference in profit margins for these two companies is accounted for in their respective market caps: Home Depot's is much higher than Lowe's. In other words, the two stocks trade at comparable valuations.

Here's the hidden advantage for Lowe's

So if industry dynamics are the same, and these two companies have prospered by comparable amounts, then why is Lowe's stock outperforming Home Depot stock? The difference maker is share repurchases.

Looking at financial results from the last five years, Lowe's has reduced its shares outstanding by 26% compared with a 12% reduction for Home Depot. Consequently, Lowe's earnings per share (EPS) have increased at a faster rate than those for Home Depot. And since stock prices tend to follow EPS growth over the long haul, this explains the difference in performance for these two investments.

HD Average Diluted Shares Outstanding (Quarterly) Chart

HD average diluted shares outstanding (quarterly) data by YCharts.

There is a downside here to the capital allocation strategy for Lowe's. Between dividends and share repurchases, the company has returned more money to shareholders than it has earned in recent years. In other words, its strategy operates at a deficit.

Lowe's isn't in financial trouble, but the strategy is unsustainable indefinitely. Therefore, the company will have to return capital to shareholders within its means at some point. And when management inevitably cuts back on repurchases, Lowe's stock might not outperform Home Depot stock anymore.

That day might come sooner rather than later. In the conference call to discuss financial results for its fiscal fourth quarter of 2022, Lowe's management said that share repurchases should cause it to reach its desired leverage ratio this year.  Once that target ratio is hit, the company will presumably start returning capital to shareholders within its means, to not incur more debt.

I'm not suggesting that Lowe's will make a bad investment from here. As mentioned, the industry is resilient, and the company will continue to earn a good profit while rewarding shareholders. That looks like a good investment recipe.

But I am suggesting that returns for Lowe's might be closer to those of Home Depot over the next five years, as Lowe's potentially lowers the rate at which it repurchases shares.