Home Depot reported Tuesday first-quarter earnings that beat analysts' expectations, but missed on the top line, dragged down rocky spring weather that hit its gardening business.

Spring is the season when many shoppers buy gardening supplies and start home renovations, making it a key quarter for home improvement retailers.

"This clearly is a garden story for us," said CEO Craig Menear. "The miss in terms of garden was significant for what we planned."

Home Depot reported same-store sales fell 4.2 percent, far less than 5.4 percent expected. Excluding performance of its garden business, though, comparable sales grew 6.5 percent, executives said on a conference call following the release of earnings.

"While spring was a reluctant bride, she has arrived," Chief Financial Officer Carol B. Tome said. "Month to date, our May comparable sales are double-digit positive."

Home Depot shares fell more than 1 percent in early trading.

Here's how the company did compared with what Wall Street expected:

Earnings: $2.08 per share vs. $2.05 per share forecast by Thomson Reuters

Revenue: $24.95 billion vs. $25.15 billion forecast by Thomson Reuters

Same-store sales growth 4.2 percent vs. 5.4 percent forecast by Thomson Reuters

In the quarter ended April 29, Home Depot said, net income rose to $2.40 billion, or $2.08 per share, from $2.01 billion, or $1.67 per share a year earlier. Analysts had expected the company to earn $2.05 per share.

While revenue rose 4.4 percent to $24.95 billion from the year-ago period, it was below the $25.15 billion analysts surveyed by Thomson Reuters expected.

Customer transactions during the quarter fell 1.3 percent, though shoppers spent an average of $66, 5.9 percent more than a year earlier.

Analysts at Jefferies last week lowered their first-quarter estimates for Home Depot, citing the poor spring weather. Jefferies expects shoppers will shift their projects to the summer rather than abandon them.

More broadly, Home Depot has been benefiting from a strong housing market and favorable economic tailwinds. Home improvement has been one of the strongest performing segments of retail, in part boosted by the recovery needed following severe weather over the past year.

Home Depot has also been building out its e-commerce strategy, surpassing its rival Lowe's in that capacity. It told analysts Tuesday morning it added to its two-hour delivery program.

Home Depot said Tuesday it is backing its previous forecasts for 2018. It has said it expects sales to rise roughly 6.5 percent and same-store sales to grow by about 5 percent.

It said that new rules regarding how it records its revenue will not materially affect its financial statements or disclosures. It will, though, change how it records revenue for its private label credit cards and gift cards.