It was nice while it lasted. Until Mr. Market's hissy fit on Thursday, home improvement products-maker Masco (NYSE:MAS) was enjoying some nice stock gains. Its price was up as much as 4% in the wake of a third-quarter earnings announcement that showed the firm's revenues down a bit less than expected and its profits down much less than feared.

For the quarter, Masco sold $3.1 billion worth of goods (down 7% year over year) and earned $0.56 per share thereon (down 12.5%). And while investors always prefer to see sales and earnings numbers going up, I must say that these numbers looked both: (1) better than expected and (2) considerably improved from where the company had looked to be heading earlier in the year. The combined results of the first three quarters this year, you see, showed sales down 7%, but profits per share down 15% in comparison to the first nine months of fiscal 2006. Likewise with profit margins.

Year to date, Masco's operating margin of 12.2% remained flat, keeping it superior to the operating margins at rival American Woodmark (NASDAQ:AMWD), and PPG Industries (NYSE:PPG), and just about equal to what Sherwin-Williams (NYSE:SHW) earns off of its revenues.

But was the mere mitigation of bad news adequate reason for Masco's stock price to rise? Maybe, maybe not. Fortunately, it wasn't all that Masco had to report. We also got some good news in the form of improved free cash flow. Masco generated improved cash from operations this year, and spent less on capital expenditures, with the result that year-to-date free cash flow came in 30% higher than last year at $641 million. If the company manages to "pull a Lowe's (NYSE:LOW)" and buck the housing trend to keep up this pace, we could well see Masco generate more than $1,022 million in cash profits by year's end.

Working the keys on my faithful solar-powered calculator, I peg the company as selling for just under nine times current free cash flow if the above scenario plays out. Meanwhile, looking past the housing downturn and into a future recovery, analysts believe Masco will increase its profits at about 12% per year over the next five years. The resulting 0.75 price-to-free cash flow-to-growth ratio tells me this firm would be a buy -- even without the hefty 3.8% dividend payout that won it a place in the Motley Fool Income Investor portfolio.

What's Masco done for us lately? Find out in:

Fool contributor Rich Smith does not own shares of any company named above. PPG is an Income Investor pick. The Motley Fool has a disclosure policy