JPMorgan has not posted a quarterly loss since the financial crisis began.
Like other banks, JPMorgan's loans are still seeing defaults increase. Credit costs amounted to $10 billion, JPMorgan said.
But the company is benefiting from a jump in mortgage refinancing and deposits, as well as low interest rates. When a bank can borrow cheaply, it can profit more from lending.
It can also earn more from trading - like Goldman Sachs Group Inc., JPMorgan pulled in record revenue from trading in the fixed-income markets. Fixed-income markets revenue was a record $4.9 billion, and helped push the entire investment bank division's revenue to a record $8.3 billion.
JPMorgan says it earned $2.14 billion in the first quarter, or 40 cents per share, on record revenue of $26.9 billion. That's down from net income of $2.37 billion, or 67 cents per share, a year earlier. But analysts predicted a profit of 32 cents per share, according to Thomson Reuters.
The company's shares were up nearly 2 percent in pre-market trading.
The results came a week after another big bank, Wells Fargo, surprised investors by announcing a record .
JPMorgan's earnings serve as the latest sign that while loan losses are surging across all regions and types of debt, low interest rates and an upturn in mortgage lending might help many banks offset those losses.
"It is reasonable to expect additional increases to credit reserves if the economic environment worsens," said CEO Jamie Dimon in a statement. "Yet, we are confident that even a highly adverse economic scenario would not compromise our overall strength and stability - or our ability to enhance our franchises."
JPMorgan said it extended $150 billion in new credit during the first quarter.
The report also comes amid speculation that the Obama administration will - designed to gauge the health of the 19 largest banks in the nation - early. The White House may do so to ease rumors about some banks being weak.
JPMorgan's investment bank pulled in a record profit of $1.6 billion. A year ago, before JPMorgan bought the nearly collapsed investment bank Bear Stearns, that division posted a loss.
Dimon said in a conference call, however, that he does not expect the investment bank's results to stay as strong throughout the year.
"It's unreasonable to expect that to continue," he said.
Its retail banking unit earned $474 million, compared with last year's loss of $311 million. That business was helped by another acquisition - the thrift Washington Mutual Inc., which JPMorgan bought last fall. Average total deposits rose 62 percent to $345.8 billion.
The WaMu acquisition also helped drive JPMorgan's commercial banking unit's income up 16 percent to $338 million.
JPMorgan's card division, however, did poorly because of surging defaults. It posted a loss of $547 million, compared with a profit of $609 million last year.
Asset management, Treasury and securities services, and the corporate lending unit also did worse in the first quarter than in the same period last year.
JPMorgan's stock is up 3 percent for the year, but still down 39 percent since its 2007 peak in May of $53.20.
JPMorgan is one of several bailout recipients, including Wells Fargo, Morgan Stanley and Goldman Sachs Group Inc., expressing interest in repaying their government debt soon. JPMorgan got $25 billion from the government late last year to keep the financial system stable and increase lending.
Dimon repeated during the conference call that he hopes to repay the government as soon as possible, and that he is "waiting for guidance from the government."
He said the bank would be able to do just as much lending without the federal funds.
"Folks, it's become a scarlet letter," Dimon said.