The company, one of the top five U.S. homebuilders, reported earnings of $100.7 million, or $1.31 per share, for the fourth quarter ended on November 30, compared with a year-earlier loss of $307.3 million, or $3.96 per share.
Wall Street expected a profit of 42 cents per share, according to Thomson Reuters I/B/E/S.
Excluding a tax benefit of $191.7 million from an extension of a federal tax law allowing companies to apply losses to prior income, KB Home posted a loss of $91 million.
Revenue fell 27 percent to $674.6 million.
KB and other builders got a breather in the second half of the year. Orders increased as buyers plunged into the market, emboldened by a federal tax credit, historically low interest rates and lower home prices.
Los Angeles-based KB's orders rose 12 percent to 1,446 homes during the quarter, but that was still slightly less than Morningstar analyst Eric Landry had forecast, especially since orders rose 62 percent in the third quarter.
Expectations for KB's orders were particularly high, Landry said, because of the buzz surrounding the company's new Open Series of smaller, cheaper homes designed to compete directly with foreclosures.
On Thursday, rival Lennar Corp
Some see a bleak first quarter for builders, however, as demand resulting from the tax credit levels off.
While the housing market seems to be stabilizing in some regions, KB Chief Executive Officer Jeffrey Mezger said, economic weakness, unemployment, and rising foreclosures and mortgage loan delinquencies as well as changing U.S. government policies could undermine that trend.
KB shares were down 6.2 percent at $15.36 in early New York Stock Exchange trading.
(Reporting by Helen Chernikoff; Editing by Lisa Von Ahn.)