Home Depot (NYSE:HD) and Lowe's (NYSE:LOW) have been navigating a bleak environment created by the housing hangover. Unlike homebuilders Hovnanian (NYSE:HOV) and Standard Pacific (NYSE:SPF), these companies stayed clear of the cliff's edge, generating positive annual earnings and steady dividends. Fortunately for Home Depot and Lowe's, toilets back up, and roofs leak, creating repairs that can't be postponed -- definitely or indefinitely -- the way a home purchase can.

If you want exposure to the home improvement market, which stock is the better bet? Let's compare the two companies.

The nuts and bolts
Lowe's and Home Depot have similar gross and operating margins. While over the last four quarters Lowe's has beat Home Depot in gross margins (34.6% to 34.1%), the tables are turned in the more important metric, operating margin (7.7% to 6.8%).

In sales per square foot, a store productivity metric, Home Depot leads with $69.62 for the third quarter of 2009 -- 17% higher than that of Lowe's.

Comparable store sales fell 6.9% and 7.5% for Home Depot and Lowe's, respectively, in the third quarter, and both expect full year 2009 sales declines. Lowe's is expanding its store base at a faster rate than Home Depot, which shrank square footage by 1.3% from last year. With nearly 550 fewer stores than Home Depot, Lowe's has more room to expand, and both face competition from niche competitors such as Lumber Liquidators (NYSE:LL) and Tractor Supply Company (NASDAQ:TSCO).

Show me the money
Home Depot has the edge on returning cash to shareholders, with a 3.2% dividend yield that is twice that of Lowe's. The company has also been more aggressive with share repurchases. While Home Depot's return on capital during the downturn -- 10.7% in the trailing 12 months -- might suggest it should retain earnings and deploy its capital, with its fuller profile of more than 2,200 stores and slower store growth, I believe returning cash makes sense for Home Depot.

Based on consensus earnings estimates for next year, Home Depot and Lowe's are valued similarly at 16.4 and 16.3 time, respectively. Both companies generated more free cash flow than earnings during the last 12 months, as they slashed capital expenditures.

Adding it up, I believe Home Depot is the better option for income investors. While both companies have reliable and safe dividends, Home Depot's yield is higher, providing a cushion to returns if business remains weak. If housing and home improvement snap back forcefully, store expansion by Lowe's could pay off, but the timing and return are uncertain. It's close, but if I had to choose just one for my portfolio, I'd take Home Depot.  

More on housing:

Fool contributor, April Taylor, does not own shares of any company mentioned in this article. Home Depot and Lowe's are Motley Fool Inside Value recommendations. Lumber Liquidators Holdings is a Rule Breakers selection. Try any of our Foolish newsletters today, free for 30 days.