Toll Brothers Inc. (NYSE:TOL) surprised analysts Wednesday by posting its first profit, albeit a small one, in nearly three years, after 11 straight quarters in the red dating back to July 2007.

The Horsham, Penn.-based company joined a number of home builder peers that have returned to profitability-barely--as it reported income of $27.3 million, $0.16 a share, for its third quarter ended July 31.This compares with a net loss of $472.3 million, $2.93 a share, in the same period last year. Analysts' consensus called for a loss of $0.14 a share.

Fewer write-downs and improved sales, general, and administrative performance helped bolster earnings. The company took $12.5 million in pre-tax write-downs versus $115 million in 3Q last year. It also garnered a tax benefit of $26.5 million. Excluding write downs, the company's third quarter pre-tax income was $13.3 million compared with a pre-tax income of $3.7 million last year.

Toll delivered 803 units in the quarter, for $454.2 in revenue. While the number of units delivered rose 1% compared to FY 2009, the dollar value declined 2%.

With the builder's community count down by 19%, signed contracts declined. Toll took orders for $400.1 million worth of homes, down 11% for701 units, down 16%. In a rare-mid-quarter release in mid-June, the company had warned that sales would be slower in this year's third quarter than last.

However, the company did better at selling in the communities it still has open, with net signed contracts climbing to 3.69 per month per community compared with the same quarters in 2009, 2008, and 2007. Historically, dating back to 1990, the company has sold 6.09 units per community per month.

But the buyers are sticking to their contracts. Cancellation rates were 6.2 in its third quarter, compared with 8.5% last year. That marked the fifth consecutive quarter in which cancellation rates were consistent with historic norms.

"We were pleased to return to profitability this quarter, especially with volumes down 65% from our peak," said CEO Douglas C. Yearley, Jr. in a statement. "Although revenues and unit deliveries for the quarter were relatively flat compared to one year ago, our gross margin, before write-offs, improved by 350 basis points. While much of this quarter's profitability was due to tax benefits, we are encouraged by the decline in impairments and our fifth consecutive quarter of more normalized cancellation rates after three years of elevated rates."

Toll ended the third quarter with 190 selling communities, compared with 215 the same period last year, but that count is expected to grow to 195 by year's end. It's likely the count will continue to rise next year as the company adds to an already sizable land bank.

Its net-debt-to-capital ratio stands at 11.5%, compared with 14.5% last year, and its cash and marketable securities measure in at $1.64 billion, up from $1.55 billion in its second quarter. The cash total was boosted by increased operations revenue, and $152.2 million in tax refunds. Toll used $63.1 million to retire debt, $104.1 million to buy land, and $29.1 million for its new Gibraltar unit investment partnership in the acquisition and management of FDIC's failed $1.8 billion AmTrust asset portfolio.

"Results this quarter were encouraging on the gross margin and closings front, and the company was profitable (barely) before taxes for the first time in three years, which we view positively," wrote Carl E. Reichardt Jr, Wells Fargo Securities analyst.

But he warned that order declines will impact next quarter's results.

"We do not believe it is likely that the company can cover its SG&A next quarter, a problem several other builders face," Reichardt wrote in his note following the earnings release. "Still, we believe the balance sheet remains strong, with net debt-to-cap of 12%, and with long-term land positions in the supply-constrained Northeastern U.S., TOL has better flexibility to re-grow than many peers, in our view."

Ticonderoga Securities analyst Stephen East had similar positive things to say in the wake of the earnings release.

"Overall we like the results at TOL," East wrote. "While Order rates are important, the biggest issue to us is improving gross margins and SG&A. On these fronts, they beat us handily, as the operating margin was more than 300 bps better than we expected. The key will be the sustainability of that improvement."

David I. Goldberg, UBS Investment Bank's analyst agreed with Toll's prediction that the company will gain market share in its move-up price range.

"In our opinion, this growth will enable market share gains for Toll as its primary competitors-smaller, private builders-continue to face capital constraints," he wrote.