Home Depot on Tuesday reported its highest quarterly revenue in the company's history, with same-store sales also blowing past Wall Street expectations.
While many retailers are struggling to grow sales, Home Depot is riding the home improvement trend as shoppers continue to invest in their homes.
Lumber, flooring and electric grills were some of its best-selling products this period, the company said. Appliances were also a bright spot.
Looking ahead, the Atlanta-based home improvement retailer has raised its outlook for fiscal 2017 for the second time this year, now expecting comparable sales to climb more than 5 percent.
Here's what Home Depot reported compared to what Wall Street was expecting, based on a Thomson Reuters survey of analysts:
Home Depot's net income for the second quarter grew to $2.7 billion, or $2.25 per share, compared to $2.4 billion, or $1.97 a share, one year ago.
Revenue came in at $28.11 billion for the period, a 6.2 percent increase from the same time last year.
"These results were made possible by our hard working associates and the outstanding values brought forth by our supplier partners," CEO Craig Menear added in a statement.
Sales at stores open for more than one year rose 6.3 percent, while comparable sales at U.S. stores increased 6.6 percent, Home Depot said.
Considering today's retail environment, this is "absolutely amazing," Oppenheimer & Co. analyst Brian Nagel told CNBC's "Squawk Box" on Tuesday morning. "What's really incredible is that quarter after quarter they report these types of numbers. ... It all starts with sales."
Home Depot has been benefiting both from growth in sales of big-ticket items, which are priced above $900, and from an increase in the average shopper's ticket. Big-ticket sales climbed 12.4 percent in the latest period, with more shoppers buying appliances and "Pro-heavy" items from Home Depot, the company said.
Meantime, the average Home Depot shopper's ticket climbed 3.6 percent, the number of customer transactions was up 2.8 percent, and Home Depot's sales per square foot grew 5.9 percent from a year ago.
There was somewhat of an elongated spring season this year, Nagel pointed out, which also likely boosted the company's second-quarter results. And, most importantly, Americans continue to pour money into their homes, he said.
In June, Americans signed more contracts to buy homes, while U.S. sales of new homes rose slightly. In May, U.S. home prices reached a fresh high for the sixth consecutive month.
Home Depot now expects revenue for the full year to be up about 5.3 percent, and for comparable sales to climb 5.5 percent. Earlier this year, the company was forecasting for sales to climb 4.6 percent, and for comps to grow 4.6 percent in 2017.
"We expect to see continued growth in the repair and remodel market as the U.S. has experienced solid wage growth, faster home price appreciation, and the reemergence of first-time homebuyers," CFO Carol Tome said on a call with analysts and investors.
The retailer has also raised its earnings outlook for the full year, expecting growth of about 13 percent from fiscal 2016, to $7.29 a share. Previous estimates had called for earnings per share of $7.15. The updated outlook includes the impact of $7 billion of share repurchases made this year, Home Depot said on Tuesday.
Home Depot continues to see solid growth, as evidenced by recent earnings results.
While the apparel sector within retail is struggling to win shoppers' dollars, home improvement companies Home Depot and Lowe's tell a better story. The two are reporting same-store sales growth that specialty retailers and department stores dream of.
To be sure, there's still some threat of Amazon encroaching on the home improvement space, Stacey Widlitz, president of SW Retail Advisors, told CNBC's "Closing Bell" on Monday.
The internet giant recently inked a partnership with Sears to sell Kenmore-branded appliances, with Alexa-enabled capabilities, on Amazon.com. The day the deal was announced earlier this year, Home Depot's shares tumbled.
Home Depot's stock was last falling about 2 percent Tuesday morning, despite the company beating the Street's views.
"As positive as the housing market has been, there is a risk that activity will wane," GlobalData Retail analyst Hakon Helgesen wrote in a note to clients.
"Another tailwind is the difficulties of other retailers, especially in categories like appliances. Although this accounts for a much smaller slice of Home Depot's success, we nevertheless see the market share gains across these areas as a sign that Home Depot is advancing in segments that sit slightly outside of the traditional home improvement space."
As of Monday's market close, shares of Home Depot have climbed about 13 percent over the past 12 months.