Home Depot (HD  ) shares were about 4% higher after the retailer beat analysts' expectations on the top and bottom line. The company also reaffirmed its full-year guidance, while many other companies are slashing their outlook due to inflation and increasing uncertainty.

Home Depot's results were highly anticipated as it provides insight into consumer spending and the housing market. So far, it's abundantly clear that momentum has slowed, but there are still no clear signs of contraction. The company also struck an upbeat tone and seems quite confident that spending in these categories should accelerate into year-end.

Inside the Numbers

In Q2, Home Depot reported $5.05 in earnings per share, beating analysts' expectations of $4.94 per share. Revenue also topped expectations at $43.8 billion vs. $43.4 billion. Overall, net income was up by 7.6%, while revenue increased by 6.5%.

The company had same-store sale growth of 5.8% which exceeded analysts' estimates of 4.9% growth. It noted that inflation caused the average ticket price to rise, while the number of transactions decreased. Total customer transactions declined to 467.4 million from 481.7 million last year. However, the average ticket per order increased by 9% to $90.02 from $82.48.

Another contributor to its gains was the company reiterating its forecast for full-year sales to grow by 3%, and comparable sales to increase by 2%. It cited healthy backlogs in terms of projects and orders. It also said that demand grew modestly despite weakness in the housing market. Further, consumers still weren't buying less expensive items despite inflationary pressures.

Another factor weighing on demand for home improvement is that many people spent considerable amounts on home goods and home improvement during the pandemic as they were forced to spend more time at home, and so many other outlets for spending were unavailable.

Overall, Home Depot shares are down 22% YTD and off by 27% from all-time highs in January of this year. Shares are up about 25% off their mid-June lows. For long-term investors, this dip is likely to be a nice entry point, while those with a short-term mindset could see lower prices especially if rates start climbing again.