Mark Lennihan, Associated Press
In this Dec. 7, 2011 photo, a woman passes a Bank of America office branch, in New York. Bank of America said Jan. 19, 2012, it made $2 billion in the last three months of 2011 from selling its stake in a Chinese bank and selling debt. That offset losses and higher legal expenses in its mortgage business.

NEW YORK — Bank of America made $2 billion in the last three months of last year, reversing a loss from a year earlier. It sold debt and its stake in a Chinese bank, offsetting losses in its investment banking business and higher legal expenses over mortgages.

The bank said Thursday that it made 15 cents per share in the fourth quarter, falling short of the 22 cents expected by analysts surveyed by FactSet, a provider of financial data.

For the year, the bank made $1.4 billion. It lost $2.2 billion in 2010.

Bank of America has been raising cash by selling off pieces that don't fit into its basic banking model. The strategy was also a way to prepare for a Federal Reserve stress test, which is under way, and meet international regulatory standards.

"We enter 2012 stronger and more efficient after two years of simplifying and streamlining our company," CEO Brian Moynihan said.

Bank of America's results are considered a gauge of the health of the American consumer. The bank serves about half of American households. The results showed that housing continues to remain a concern in the economy.

Bank of America's real estate business lost $1.5 billion after a 74 percent decline in new home loans. The bank lost some market share and closed a division that helped third-party home lenders.

But Americans seemed to be getting their financial houses in order by paying off more debt on time.

Bank of America, one of the largest credit card issuers, said customers who paid bills a month late declined for the 11th consecutive quarter. New credit card accounts also grew 53 percent, and the division posted a profit of $1 billion.

The $2 billion net income for the fourth quarter compared with a $1.2 billion loss in the same quarter a year ago.

The bank made $2.9 billion by selling its stake in China Construction Bank and $2.4 billion more selling debt and exchanging its higher-cost preferred stock for common stock.

It set aside $1.5 billion for litigation expenses, mostly related to fighting lawsuits from mortgage loans.

Bank of America's investment banking business reported a loss of $433 million due to lower investment banking fees and lower sales and trading driven by the rocky stock and bond markets in the last three months of the year.

Bank of America shares gained 7.5 percent in pre-market trading to $7.31.