Bank of America, the nation’s biggest bank, announced Tuesday that operating profit rebounded in the third quarter, helped by improved credit conditions among consumers and businesses.

On a noncash basis for the quarter, the bank reported a loss of $7.3 billion because of a $10.4 billion write-down in the value of its credit card unit, attributed to federal regulations that limit debit fees and other charges.

Without the one-time charge, the bank earned $3.1 billion, or 27 cents a share. Wall Street had been expecting earnings of 16 cents a share, according to Thomson Reuters.

Analysts said the improving credit environment was a healthy sign, both for the bank and the broader economy. The bank set aside $5.4 billion in the quarter for credit losses, $2.7 billion less than the previous quarter and $6.3 billion less than the period a year ago.