Bank of America and Citigroup shares fell as the banks' results highlighted the sluggishness of the U.S. economic recovery and costs of potential regulation, offsetting better-than-expected quarterly profits on lower credit losses.

Following JPMorgan Chase & Co on Thursday, the banks reported on Friday that investment banking profits fell between 20 and 40 percent from the first quarter because trading dried up in the wake of the flash crash and the European debt crisis. That is a bleak sign for Goldman Sachs Group Inc and Morgan Stanley, due to report next Tuesday and Wednesday.

Revenue was down broadly at Bank of America and Citi from a year earlier and they, like their rivals, are grappling with how their businesses will be affected by the financial reform bill passed by the U.S. Congress on Thursday.

Executives at Bank of America Corp and Citigroup Inc said the impact of the bill was uncertain.

In a presentation to analysts, Bank of America said the costs from credit card reform would total $1 billion this year, changes to service charges and other fees could cost up to $2 billion annually, while debit card reform could cost up to $2.3 billion. The bank will also report a goodwill charge as large as $10 billion this quarter, due to new debit card fee rules.

Citi executives, like those of JPMorgan on Thursday, said they were unable to quantify the possible costs for their business.

Banks will have to eke out revenue and cut costs wherever they can and try to make up elsewhere any revenue losses from financial reform, said Nancy Bush, an analyst at NAB Research.

It's going to be this way for the next several years, she said. It's an extremely tough environment. U.S. unemployment hovers around 10 percent and a report on Friday showed that consumer sentiment dropped to a near one-year low in July.

Shares of Bank of America, the biggest U.S. bank by assets, fell their most in more than a year, down 9 percent to $13.98, wiping more than $10 billion from its market capitalization of $154.5 billion on Wednesday. Citigroup, which is No. 3 behind JPMorgan, slumped more than 6 percent to $3.90. Bank of America and Citigroup were the top two most-traded shares on Friday.

Shares of No. 4 Wells Fargo & Co, which reports results next Wednesday, fell 5.7 percent to $26.24. The KBW Banks Index was down 5.7 percent.

RESERVES

Bank of America and Citigroup said credit costs broadly eased in the second quarter, allowing them to put less money aside against future losses. Bank of America and Citi both released about $1.2 billion net of taxes, equivalent to about 38 percent and 43 percent of their profit, respectively.

Both reports reflect a significant improvement in credit quality but little in the way of identifying how they're going to go from that to revenue growth, said Marshall Front, chairman of Front Barnett Associates.

Loans at Bank of America slipped about $20 billion or 2 percent to $956 billion compared to the first quarter, while at Citi total loans fell about $30 billion, or 4 percent to $692.2 billion. Analysts and investors expressed concern about bank executives' comments that credit demand was still weak.

I don't see a great deal of demand in the near term, at least until this uncertainty is removed, said Citigroup Chief Financial Officer John Gerspach, on a call with reporters.

To boost earnings without relying on reducing loss reserves, banks are likely to increase cost-cutting, Bush said.

Bank of America Chief Executive Brian Moynihan told analysts on a conference call, Over the next several years, costs are going to be an issue for our industry, especially on the consumer side.

Moynihan, Wall Street's newest CEO, took over from Kenneth Lewis at the start of the year and has largely been lauded for his work at the bank. He has worked to reestablish ties to the investor community and regulators, relationships that became strained through the financial crisis and a probe into Bank of America's acquisition of Merrill Lynch & Co Inc.

Bank of America also reported $1.1 billion in pretax gains from sales of stakes in two Latin American banks. Citigroup reported that it reduced its special asset pool for housing toxic assets such as subprime mortgages by $38 billion. That unit, known as Citi Holdings, now makes up less than a quarter of Citigroup's balance sheet.

INVESTMENT BANKS

In recent quarters, banks have depended on their investment banking units to perform well while their consumer business was hit by rising losses. Now, as consumer loan losses are less of a worry, trading revenue has suffered as stock markets were hit by a flash crash in the United States and sovereign debt problems in Europe.

Revenue at Bank of America's investment bank slumped to $6 billion in the second quarter from $9.8 billion in the first quarter. A large part of that drop was from fixed income, currencies and commodities trading, which fell 58 percent or $3.2 billion to $2.3 billion. Citigroup also said its securities and banking revenue fell, down 26 percent from the first quarter to $6 billion.

These units were also hurt by a tax the banks paid on UK bankers' bonuses. The tax looks set to cost the five major U.S. banks with businesses in London about $2.5 billion in all.

Bank of America, which bought investment bank Merrill Lynch & Co at the end of 2008, said Merrill's brokerage unit saw profit fall 12 percent and its assets under management were down 3 percent.

(Reporting by Joe Rauch and Maria Aspan; additional reporting by Elinor Comlay, Dan Wilchins; editing by John Wallace, Leslie Gevirtz, Phil Berlowitz)