Bank of America
Bank of America had a better Q3 than most major banks. Reuters

Bank of America Corp. (NYSE:BAC) said on Wednesday that it earned $2.5 billion in the third quarter, or 20 cents a share, as continuing cost-cutting measures and improved credit quality boosted results.

Analysts polled by Thomson Reuters had expected the company to earn 18 cents a share.

The nation's second-largest bank's revenue slipped to just above $22 billion. A year ago the company earned $340 million, or zero cents per share, on revenue $22.53 billion.

"This quarter, we saw good loan growth, improved credit quality and record deposit balances," Chief Executive Officer Brian Moynihan said in a press release. "Our customers and clients continue to do more business with us."

The bank's provision for credit losses, money set aside to cover possible souring loans, fell 83 percent to $296 million.

The bank also counted a $750 million pre-tax gain in the quarter from its sale of shares in China Construction Bank.