Net income fell to $5.36 billion from $5.42 billion a year earlier, the San Francisco-based bank said Tuesday. That's after taking out dividends for preferred stock. On a per-share basis, earnings rose to $1.03 from $1.01.
Revenue rose 1 percent, to $21.3 billion, from $21.07 billion in the same period a year earlier.
The earnings were in line with Wall Street's expectations, according to data provider FactSet. Revenue came in slightly lower than forecast. Analysts at FactSet had expected revenue of $21.6 billion.
The bank's net interest margin, a measure of how much profit it makes on money it loans out, shrank to 2.97 percent in the second quarter from 3.15 percent a year earlier. The measure is closely watched by financial analysts.