after reviewing each company's mid-year updates, investors have a clearer picture of what's going on at Home Depot (HD 0.02%) and Lowe's (LOW -0.03%). The good news is that the home improvement industry is still growing even after soaring results over the past few years. Profit margins aren't diving, either, as they have been for other retailing niches.

But the two competitors have different outlooks for the full 2022 year, which helps explain the valuation gap between the two stocks. With that in mind, let's look at which investment might fit better in your portfolio.

Why Home Depot is growing

Home Depot is the more attractive stock when it comes to growth potential. And I'm not just talking about the latest sales, which rose 5% this past quarter compared to Lowe's flat result. The industry leader is winning in this area partly because it gets a higher proportion of revenue from professional contractors as opposed to do-it-yourself home remodelers.

That pro niche should be an excellent growth avenue going forward, and it also provides some diversity that might cushion sales if spending trends continue slowing. In Q2, for example, Home Depot's average transaction rose 9% to $90, mainly because of growth in big-ticket transactions that are over $1,000.

That's good news for investors worried about a more severe growth hangover ahead. Both Lowe's and Home Depot are likely to be hurt by such a pullback, but the industry leader is better positioned to sail through these challenges.

Finances are strong

Investing returns are ultimately driven by earnings growth, and there's a good case to be made that Lowe's will outperform here. The company achieved slightly higher profitability in Q2 and its current profit margin of around 13% of sales has room to expand toward Home Depot's 15.4% level.

HD Operating Margin (TTM) Chart

HD Operating Margin (TTM) data by YCharts

This gap has persisted through a wide range of industry selling conditions, and so investors shouldn't expect a big change in the dynamic. Still, Lowe's brings a lot to the financial side of the ledger. It generates plenty of cash, spends aggressively on stock buybacks, and has an unbroken streak of annual dividend raises that Home Depot can't match.

The better deal

Investors today can purchase Lowe's stock at a discount to Home Depot's. You have to pay roughly 1.5 times annual sales for the industry's No. 2 player compared to Home Depot's 2.2 times metric.

That gap makes sense given that Home Depot is likely to grow more quickly while generating faster earnings growth over the next several years. If growth is your main goal, that's likely the stock for you.

On the other hand, Lowe's valuation makes the stock less risky. The company's relatively modest dividend payment (35% of earnings compared to Home Depot's 55%), means more room for growth and a smaller chance of a surprise cut. These factors suggest that Lowe's stock is ideal for investors who prize stability and want to limit exposure to big declines.

Yes, both companies are in the consumer discretionary space and would be hurt by a recession or consumer spending slump. But the long-term outlook is bright for the home improvement industry, and Lowe's and Home Depot stocks offer different ways to gain exposure to that positive trend.