NEW YORK - Home Depot, the largest U.S. home-improvement retailer, posted second-quarter profit that topped analysts' estimates and raised its forecast for the year as sales of seasonal merchandise rebounded.

Net income in the three months through Aug. 3 rose 14 percent to $2.05 billion, or $1.52 a share, from $1.8 billion, or $1.24, a year earlier, the Atlanta-based company said Tuesday in a statement. The average of 25 analysts' estimates compiled by Bloomberg was $1.44.

Rising home prices are encouraging consumers to spend more on renovations while improved weather spurred purchases of yard merchandise that shoppers passed up earlier in the year because of a late spring. Second-quarter sales gained 5.7 percent to $23.8 billion, topping analysts' estimates. Results have also been aided by Chief Executive Officer Frank Blake's focus on boosting sales from existing locations and e-commerce.

"This strong performance gives us further confidence that Home Depot can handle a slower paced housing market recovery on strong execution," Kate McShane, an analyst at Citigroup Inc. in New York, said in a note to clients. She recommends buying Home Depot shares.

Home Depot said profit this year will be $4.52 a share, including the benefit of share repurchases, up from a previous forecast of $4.42.

The stock gained 11 percent in the 12 months through Monday. That compares with a 15 percent advance for Lowe's Cos., which reports second-quarter results Wednesday, and a 19 percent increase for the Standard & Poor's 500 Index.

While Home Depot and Lowe's have benefited from the housing rebound, retailers that sell basic goods and apparel are struggling as lackluster wage gains restrain spending by middle- and low-income consumers. Discounters Wal-Mart Stores and Target as well as department-store chain Macy's all reported second-quarter results this month that showed evidence of sluggish consumer demand.

A harsh winter and late spring this year delayed purchases of seasonal items such as landscaping materials, hurting Home Depot's results in the first quarter. Sales in those categories rebounded in the second quarter, Blake said in Tuesday's statement.

Same-store sales, considered an important measure of performance because only established locations are counted, rose 5.8 percent. Analysts expected a gain of 4.4 percent, according to Consensus Metrix.

Homeowners also are buying more appliances, a category Home Depot has been expanding. U.S. shipments of major home appliances rose 7.1 percent in July, according to the Association of Home Appliance Manufacturers.

While home values have been consistently gaining for more than two years, the growth slowed to a 4.4 percent advance last quarter from an increase of 8.3 percent in the first quarter, according to the National Association of Realtors. Price appreciation is moderating as more properties are listed for sale and buyer demand slows, the group said.

Limited availability of credit, sluggish wage gains and higher interest rates are also proving to be obstacles to the continued housing recovery. Pending sales of previously owned homes fell 1.1 percent in June, the realtors group said last month.

Home Depot said it had about 409.7 million customer transactions in the quarter and that the average purchase increased 1.8 percent to $58.43.

Controlling costs also helped profit. Selling, general and administrative expenses were little changed last quarter, while sales rose.

Home Depot has bought back $3.5 billion in shares this year and said it will repurchase another $3.5 billion over the remainder of the year.