Bank of America's second-quarter earnings reversed a year-earlier loss and beat analyst expectations as higher mortgage income, improved credit quality and the absence of good will impairment charges offset lower interest income, the New York financial giant said Wednesday.

Net income was $2.5 billion, or 19 cents per share, compared with a loss of $8.8 billion, or 90 cents per share, in the year-earlier period. Analysts expected earnings per share of 15 cents per share, according to an analyst survey by Bloomberg News. Revenue, net of interest expense, jumped to $22.2 billion from $13.48 in last year's second quarter.

The company's Basel 3 Tier 1 common capital ratio rose to 8.1 percent.