Home improvement behemoth Lowe's (NYSE:LOW) reported a solid third quarter, but results for the next 12-18 months may prove more difficult. Do investors have an opportunity to turn short-term pain into longer-term gain?

For the quarter, total sales grew 5.8%, while same-store sales fell 4%. Management attributed the weak comps to a slowdown in the domestic housing market, certain commodity product deflation, and the fact that last year's results were boosted by hurricane-related spending and rebuilding efforts. It expects industry demand to remain challenging for the remainder of this year and into next year as home construction slows due to higher interest rates.

Bottom-line trends remained strong as margins improved across the board. Compared to last year's third quarter, net income jumped 15%. But due to the projected tougher days ahead, management now expects fiscal 2006 earnings of $1.95-$1.97, whereas previous projections called for over $2 a diluted share. It is projecting total sales growth of 9%, but comps should only come in flat compared to 2005.

So where do investors go from here? For those inclined to look longer term, I don't think you can go wrong with either Lowe's or its larger archrival, Home Depot (NYSE:HD). I've been leaning toward the latter for reasons I've laid out in a recent Dueling Fools, but it's a very close call and Lowe's may be the safer bet right now.

Fellow Fool Dave Meier recently offered some extremely useful insight into lower profitability in Home Depot's supply business, which is becoming the engine to keep growth chugging along. Depot also posted weaker comps than Lowe's for the third quarter, which has become a common occurrence. It is addressing its store layout and sales approach and may even be emulating Lowe's, who has seen more success from a cleaner, more attractive, and better organized store base.

Additionally, Lowe's has more room to grow its store count; it recently reported 1,330, stores while Home Depot is at 2,104 as of Q3. That's 40% fewer stores. As a result, on the retail front it can grow faster total sales than Depot for at least another few years.

Clearly, there's more uncertainty at Home Depot, as it is a neophyte in the do-it-for-me (DIFM) market where suppliers provide the labor and product to help consumers complete home renovations and other projects. But does it have a first-mover advantage as Lowe's has yet to conquer every U.S. market? That's hard to answer at this point; the one thing I do know is that the entire home-improvement industry is a $700 billion market, comprised of about 20% DIFM and about 80% do-it-yourself and the related store retail operations. That leaves plenty of room for both players.

Both Lowe's and Home Depot generate impressive amounts of cash and have reputations as two of the savviest retailers out there. This includes other big-box giants such as Wal-Mart (NYSE:WMT), Target (NYSE:TGT), and Costco (NASDAQ:COST), who have each found ways to dominate certain segments of the consumer retail marketplace. In a couple of years, investors may be kicking themselves that they didn't take advantage of thehomebuilding malaise to pickup some shares of the two dominant home-improvement giants. Time will tell.

For related Foolishness:

Home Depot and Wal-Mart are an Inside Value picks. Costco is a Stock Advisor selection.

Fool contributor Ryan Fuhrmann is long shares of Home Depot but has no financial interest in any other company mentioned. Feel free to email him with feedback or to discuss any companies mentioned further. The Fool has an ironclad disclosure policy.