Mark Lennihan, Associated Press
In this Monday, July 13, 2015 photo, people walk past a Wells Fargo ATM in New York. Wells Fargo reports quarterly financial results on Tuesday, July 14, 2015.

NEW YORK — Wells Fargo, the nation's biggest mortgage lender, says its second-quarter profit edged lower.

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.

The bank's stock fell 0.6 percent to $56.40 in premarket trading.