ATLANTA — Consumers’ desire to update kitchens and refresh paint jobs lifted Home Depot sales in the third quarter, even as other retailers struggled in the days before the holiday season.

The Atlanta-based home improvement giant reported Tuesday that sales rose 6.4 percent to $21.8 billion for the quarter. The gain was fueled by strong business from contractors and handymen as Americans use savings from lower gas prices to update homes.

“It’s a sign of the strength of the housing rebound as well as the housing stock,” said Home Depot chief financial officer Carol Tome.

Home Depot’s fortunes contrasted with sales declines announced in the past week among some large clothing retailers, such as Macy’s, Dilliard’s and Nordstrom. The downturn right before Thanksgiving underscore the importance of sales this holiday season, which already are expected to grow slower than the year before. Home Depot’s third quarter profit was $1.7 billion, or $1.35 a share, compared with profit of $1.5 billion, or $1.15 a share, in the same period in 2014. Hakon Helgesen, a retail analyst at retail research agency Conlumino, said in a note that Home Depot is aligned with what consumers want.