By Matt Grossman

Lowe's Cos. on Wednesday beat analysts' forecasts with strong profit and revenue growth in the second quarter as Americans staying at home during the coronavirus pandemic spent more on household projects.

The Mooresville, N.C.-based home-improvement retailer saw same-store sales in the U.S. increase by 35.1% year over year, and sales on its website grow by 135%.

Lowe's posted a second-quarter net profit of $2.83 billion, or $3.74 a share, compared with $1.68 billion, or $2.14 a share, a year earlier.

On an adjusted basis, Lowe's earnings were $3.75 a share. Analysts had forecast adjusted earnings of $2.92 a share, according to FactSet.

Revenue was $27.3 billion, a 30% increase compared with the $21 billion of sales Lowe's recorded in last year's second quarter. Analysts had estimated revenue of $24.32 billion.

All of Lowe's merchandising divisions had comparable sales growth of more than 20%, and all of the company's U.S. regions saw comparable sales grow at least 30%, the company said.

Lowe's said it spent $560 million in coronavirus-related financial support to associates through the first half of the year.

The company previously withdrew its financial guidance for the full year and declined to provide new guidance, citing uncertainty during the pandemic.

Write to Matt Grossman at matt.grossman@wsj.com