(Bloomberg) -- Home Depot Inc.’s second-quarter results beat Wall Street estimates even as the US housing market shows signs of cooling off.

The home-improvement retailer on Tuesday reported comparable sales growth of 5.8% in the three months ended July 31, topping the average analyst estimate of 4.6%. Revenue and earnings also beat expectations.

The pandemic housing boom is starting to abate in the US, slowed down in part by rising mortgage rates, as well as the elevated costs of materials and labor. Government data released Tuesday showed new US home construction fell in July by more than forecast, to the slowest pace since early last year. Despite these headwinds, Home Depot said project backlogs remain healthy and strong sales trends have continued into the current quarter.

Shares of Home Depot rose 1.7% in New York trading at 9:55 a.m., erasing an earlier decline in premarket trading. Rival Lowe’s Cos., which reports earnings Wednesday, climbed 1.1%.

Home Depot reiterated its guidance for the rest of its fiscal year, including comparable sales growth of about 3%. The company told analysts on a conference call that it’s taking a conservative approach to the forecast due to economic uncertainty.

The results point to comparable sales growth of around 1% for Lowe’s, below the average analyst estimate of 2.3%, said Michael Baker, a DA Davidson & Co. analyst, in a note to clients.

Home Depot has a greater exposure to professional contractors, who are more resilient to the pinch of inflation than do-it-yourself customers. The retailer said it saw some weakness from do-it-yourself buyers last quarter.

Home Depot said it saw 3% fewer customer transactions last quarter than a year ago, its fifth-straight quarter of declines. At the same time, the average customer ticket rose 9% in the second quarter, to around $90, driven primarily by higher prices.

“Near-term growth should remain supported by favorable pricing even as transactions moderate,” said Bloomberg Intelligence analyst Drew Reading.

(Updates with data on housing starts in third paragraph.)

©2022 Bloomberg L.P.