Home Depot (HD  ) benefitted from the strength in housing and the pandemic which shifted spending towards home improvement and household goods away from other categories. As a result, its second-quarter sales increased by 23%, and profits were 25% higher. Both are above analysts' expectations. Its stock opened at new highs but finished 1% lower.

Inside the Numbers

Home Depot earned $4.02 in earnings per share vs $3.71 expected per share. Its revenue was $38.1 billion which beat expectations of $34.5 billion. In 2019's second-quarter, it reported $3.17 per share in earnings and $2.93 billion.

Across nearly every metric, the company posted a double-digit gain including transactions, average purchase, and same-store sales. Visits to the store increased by 8%, average purchase size increased by 10%, and same-store sales increased by 25%. This marked acceleration in same-store sales from 8% in the previous quarter, and it's the fifth straight quarter of acceleration in same-store sales. Online orders also grew 100% with 60% of customers picking up their orders from the store.

The company also said that sales to consumers exceeded that to contractors. Although, both groups had higher sales. Given the pandemic, many people are embarking on home improvement projects or hiring contractors for renovations. These trends are also likely to persist given that spending in travel, restaurants, and nightlife is likely to remain depressed, and home prices are going to keep rising.

It didn't give any guidance for the rest of the year or next quarter due to the uncertainty around the coronavirus, however, it noted that people are becoming increasingly comfortable with having professionals inside their home which should lead to more gains for contractors sales. Along with the increased sales, Home Depot's costs increased by $590 million on additional compensation for employees and increased sanitary measures.

Stock Price Impact

Home Depot's shares were muted as management was cautious about whether this momentum would last. However, its stock has been on fire since the market bottom in late-March, as it's gained more than 100% since then. The market's optimism on the stock has been justified by its strong earnings report.

As long as the housing market stays strong, Home Depot will outperform. The combination of low housing supply and low mortgage rates will ensure that prices won't collapse anytime soon. Right now, the biggest threat to the economy is a resurgence in the coronavirus which leads to decreased economic activity. The last few months have proved that Home Depot can thrive under those circumstances.

Therefore, the outperformance of shares is likely to continue. Investors should consider adding the stock on weakness.