Bank of America Corp. (NYSE:BAC) on Wednesday said it earned $4 billion, or 32 cents per share, in the second quarter, on revenue of $22.95 billion. Analysts polled by Thomson Reuters had expected the company to earn 25 per share share.

That's in comparison to a profit of $2.50 billion, or 19 cents per share, a year earlier when the bank recorded revenue of $22.2 billion.