Investors had concerns heading into Home Depot's(HD -1.64%) third-quarter report this week, mainly around the prospect that a slowdown in homebuilding would harm its results. However, the retailer's updated sales and profitability trends showed no signs of worsening. Instead, the management team took the opportunity to raise its sales and profit outlook for the second straight quarter.

More on that brightening forecast in a moment. But, first, let's take a closer look at the latest results.

A man with a shopping cart looks over thin pieces of lumber.

Image source: Getty Images.

Growing strong

Comparable-store sales expanded at a 4.8% rate, which marked a slowdown from the prior quarter's 8% spike. However, that second-quarter boost was powered by unusual weather patterns that pushed seasonal sales from the first quarter into that period.

Stepping back to look at the broader results reveals steady market share gains and a healthy industry expansion, with customer traffic up 1.2% over the past nine months and average spending per visit higher by 4.8%. The shopper traffic figure was slightly better this quarter while average spending growth was a bit lower than that nine-month average. "We are pleased with our third quarter results and the growth we saw from both our professional and do-it-yourself customers," CEO Craig Menear said in a press release.

Spending and pricing

Home Depot's pricing held up well, which allowed gross profit to improve to $9.2 billion, or 34.8% of sales, from $8.6 billion, or 34.6% of sales a year ago. That success implies rival Lowe's (NYSE: LOW) hasn't yet been able to seriously challenge the retailer's top spot in the industry.

Home Depot spent more aggressively on building out its online sales channel, and that boost in selling and administrative expenses kept a lid on operating margin. However, the combination of improved gross margins, lower taxes, and a sharply falling outstanding share count produced significant profit growth, with earnings per share up 37% to $2.53 per share.

Executives are sending about 55% of earnings to investors in the form of dividends, but they are increasingly funneling bigger portions of their profit bonanza toward stock repurchase spending. In fact, Home Depot announced that it is lifting its 2018 buyback target to $8 billion, up from $6 billion last quarter and $4 billion at the start of the year. Based on its year-to-date purchases, that suggests the company plans to spend about $2.5 billion on buybacks in the fourth quarter.

Updated outlook

Those stock repurchases are happening as management gets more confident about operating trends. Menear and his team lifted their 2018 outlook for the second straight quarter and they now see comparable-store sales rising by 5.5% rather than the 5.3% they predicted back in August and the 5% initial target they set for the year. Earnings should grow by a market-thumping 34% rather than the 29% increase they predicted three months ago, including the impact from Home Depot's aggressive buyback plans.

These predictions imply just a modest sales growth slowdown compared to 2017's hurricane-fueled expansion as earnings -- and direct shareholder returns -- spike higher.