Thanks to a pair of mid-November earnings reports, investors have a clear picture into the latest operating trends from Home Depot (HD -1.29%) and Lowe's Companies (LOW -1.44%). While the home-improvement giants are under pressure from inflation and a cooling housing market, both retailers showed solid sales and profitability trends through late October. Plus, neither company lowered its 2022 outlook.

With that big picture in mind, let's take a look at the two businesses to see which one looks like the better stock buy right now.

Home Depot's advantages

Home Depot continued to demonstrate its market-leading position in all the critical operating metrics. Comparable-store sales rose 5% in the core U.S. market compared to Lowe's 3% uptick.

While both companies fared well with the professional contractors that are powering industry growth today, Home Depot gained more growth from that niche.These shoppers spent heavily in areas like fasteners and pipe fittings, executives said in a conference call with investors.

"We're encouraged by the continued momentum we are seeing with both our pro and [do-it-yourself] customers," Home Depot Executive Vice President Jeff Kinnard said.

Home Depot also outpaced its smaller rival when it came to profitability. Both companies are succeeding in boosting prices and cutting costs in this tough selling environment, but Home Depot's competitive edge showed up in its operating margin, which rose to 16% of sales.

The comparable figure for Lowe's is closer to 13% of sales. Its operating income has declined slightly over the past nine months, while Home Depot's operating profit is up an impressive 5.9%.

The trend is your friend

Lowe's does enjoy slightly stronger momentum as we close out the 2022 year. The company made progress with the pro shopper in Q3 and solved many of the inventory and stocking challenges that hurt sales in the prior quarter. As a result, comparable-store sales improved 3%. Home Depot, in contrast, slowed slightly.

Lowe's also raised its sales and profitability forecast for the year, while Home Depot merely affirmed its prior forecast.

Home Depot's steady forecast still reflects continued market-share gains, higher sales growth, and market-leading profitability. Its faster earnings expansion makes it likely that the company will announce a bigger dividend increase in early 2023 as well. Home Depot aims to return a bigger portion of annual earnings in dividends (about 55%) than Lowe's does (35%).

LOW PS Ratio Chart

LOW PS Ratio data by YCharts.

If you're more interested in a rebound story, then Lowe's stock might be worth adding to your watchlist. Yes, the retailer has failed in the past to meaningfully close the growth and profit-margin gap with its bigger rival. But even modest progress here could support strong returns for the stock.

On the other hand, Home Depot already boasts many of the impressive characteristics that Lowe's is working to achieve. It's growing more quickly, generating more cash and earnings, and winning market share across a wider group of customers.

The stock is more expensive if you look at its price-to-sales ratio. Yet Home Depot consistently earns that premium and demonstrates why it's such a great stock to own for the long term.