Bank of America Corp reported lower first-quarter profit as the second-largest U.S. bank took accounting charges related to its debt, but results topped analysts' estimates as credit quality improved.

The bank reported charges of $4.8 billion related to changes in the value of its debt, partially offset by gains of $3.4 billion from equity investments and debt-related transactions.

Excluding debt valuation adjustments, it earned 31 cents a share.

Analysts' average earnings estimate was 12 cents per share, according to Thomson Reuters I/B/E/S. Bank of America said analysts typically do not include debt valuation adjustments in their estimates.

Bank of America shares were up more than 3 percent in premarket trade.

The bank's Tier 1 common equity ratio -- comparing its core equity capital to its risk-weighted assets -- rose to 10.78 percent from 9.68 percent in the 2011 fourth quarter as it issued shares to employees, shed assets and accumulated earnings.

First-quarter net income was $653 million, or 3 cents a share, down from $2.05 billion, or 17 cents per share, a year earlier.

Revenue declined to $22.3 billion from $26.9 billion.

The Charlotte, North Carolina-based bank took a loan-loss provision of $2.4 billion, compared with $3.8 billion a year ago.

In its capital markets operations, Bank of America reported sales and trading revenue of $3.8 billion, up from $1.5 billion in the fourth quarter but down from $4.6 billion a year ago.

JPMorgan Chase & Co, Citigroup Inc and Goldman Sachs Group Inc also reported a rebound in first-quarter trading compared to the fourth quarter, when worries about the European debt crisis shriveled business.

Bank of America shares are up 60 percent this year after falling 58 percent in 2011. The bank passed the Federal Reserve's latest stress test in March, shifting investor concerns from its capital needs to its ability to grow earnings in a time of low interest rates and increased regulation.

(Reporting By Rick Rothacker in Charlotte, North Carolina; Editing by Gerald E. McCormick and John Wallace)