By Karen Jacobs

The company also said it planned to open fewer new stores and that per-share profit would fall for the third consecutive year as the recession and softer U.S. housing market eat into sales.

Yet analysts said Home Depot, which has aggressively cut costs and boosted spending to improve existing stores, was faring better than smaller rival Lowe's Cos on some metrics. Lowe's posted quarterly results that missed Wall Street estimates last week.

"They are really taking the fight back to Lowe's after languishing behind in key profit measures for about two years," said Brian Sozzi, an equity research analyst with Wall Street Strategies in New York.

"The guidance has been on the money, which has allowed Home Depot to beat earnings consensus strongly in the past four quarters," Sozzi said.

Home Depot posted a net loss of $54 million, or 3 cents a share, for the fourth quarter ended February 1, compared with earnings of $671 million, or 40 cents a share, a year earlier.

The latest results included a pretax charge of $387 million tied to the elimination of 7,000 jobs from the closure of the Expo Design Center chain and other corporate cuts. There was also a $163 million writedown of an investment.

Excluding those items, profit from continuing operations was 19 cents a share, exceeding the analysts' average forecast of 15 cents, according to Reuters Estimates.

Sales fell 17 percent to $14.61 billion. Sales at stores open at least a year, an important measure, fell 13 percent, hurt by an extra week in the year-earlier quarter.

Excluding the calendar shift, same-store sales fell 11.5 percent. Home Depot said same-store sales for U.S. stores were down 9.2 percent. Last week, Lowe's said its same-store sales fell 9.9 percent.

Operating expenses at Home Depot fell 2 percent in the fourth quarter, and inventory declined.

The U.S. housing slump and tight credit market has curtailed demand for big-ticket remodels that powered growth at Home Depot and Lowe's in recent years.

FEWER MARKDOWNS

While both chains have trimmed corporate costs and curbed store openings, analysts cited progress at Home Depot.

For example, Home Depot said its gross margin came to 34 percent in the fourth quarter, falling 32 basis points from a year earlier. Lowe's last week posted a bigger drop, to 33.7 percent from 34.9 percent. Home Depot cited fewer markdowns in the quarter, while Lowe's said competition led it to cut prices on seasonal goods.

"Home Depot clearly has stronger momentum," Credit Suisse analyst Gary Balter said in a research note, citing its U.S. same-store sales and improved inventory position in the fourth quarter.

"It also has higher free cash flow, a stronger dividend and a management team that has been more realistic on the macro throughout this downturn," Balter added.

Atlanta-based Home Depot said per-share earnings from continuing operations would fall about 7 percent over the next fiscal year. It plans to open 12 net new stores this year, compared with 40 opened last year, as capital spending falls to $1 billion.

The full-year outlook assumes no further share buybacks or any potential sales benefit from a U.S. economic stimulus package, Home Depot said.

Home Depot shares were up $1.39, or 7.4 percent, at $20.10 on the New York Stock Exchange, while Lowe's gained 54 cents, or 3.6 percent, to $15.63. Home Depot's shares have fallen 12.7 percent this year, while Lowe's is down 27.5 percent.

(Reporting by Karen Jacobs; Editing by Derek Caney and Lisa Von Ahn)