What happened 

Shares of Home Depot (HD 0.22%) popped today after the company reported better-than-expected second-quarter results and reaffirmed its full-year guidance. 

The home improvement retail stock was up by as much as 5.8% today and had gained 4.1% as of 3:38 p.m. ET. 

So what 

Investors were happy with Home Depot's second-quarter revenue, which increased 6.5% from the year-ago quarter to $43.8 billion and beat analysts' consensus estimate of $43.4 billion. 

A man picking up a piece of lumber.

Image source: Getty Images.

Additionally, the company's bottom line also impressed shareholders, with the home improvement company's non-GAAP earnings per share of $5.05 outpacing earnings of $4.53 in the year-ago quarter and coming out ahead of Wall Street's average estimate of $4.95. 

"In the second quarter, we delivered the highest quarterly sales and earnings in our company's history. Our performance reflects continued strength in demand for home improvement projects," Home Depot CEO Ted Decker said in a press release. 

Home Depot also reported solid same-store sales growth of 5.8% in the quarter, beating analysts' consensus expectation of 4.9%. 

Now what 

Home Depot's chief financial officer Richard McPhail said on the company's earnings call that Home Depot is "operating in a broad-based inflationary environment not seen in four decades, while managing through constrained global supply chain conditions, all against a backdrop of monetary policy shifts intended to moderate demand."

But management remains confident and reaffirmed its fiscal 2022 guidance. Home Depot's management expects sales growth of 3% for the full year -- which would equate to about $155.8 billion -- and for same-store sales to increase by 3% compared to 2021. 

With the company reiterating its previous guidance and beating Wall Street's expectations for the quarter, it's no wonder investors were excited about this retail stock today.