Moody's has cut the ratings of 15 of the world's biggest banks, hours after the markets were digesting the admission by Spain that its banks could need up to €62bn of bailout money to see them through the next three years.

The result of the independent audit of Spain's banks put the gap in their finances at between €16bn and €62bn – similar to the €50bn calculated by the International Monetary Fund (IMF) two weeks ago.

Banking giants including Bank of America, Barclays, Citigroup, HSBC, Goldman Sachs, Morgan Stanley and Royal Bank of Scotland all had their credit ratings cut.

The ratings agency said the cuts reflected declining profitability

in an industry suffering from a slowdown in economic growth, tougher

regulations and nervous investors.

A downgrade can push up the cost of borrowing for a bank and require it to put up extra collateral for some existing business. Higher borrowing costs on the market could also lead banks to push up borrowing costs to customers.

Moody's downgraded the bailed out Royal Bank of Scotland by one notch – as had been warned. RBS said this would force it to post £9bn of extra collateral against existing positions but said it disputed the ratings change, which also affected its short-term debt rating.

HSBC, which had been warned of a two notch hit, declined to comment after it was cut by just one notch while Barclays was cut by the two notches that the agency had warned it faced. Moody's said the banks "have significant exposure to the volatility and risk of outsized losses inherent to capital markets activities".

Lloyds Banking Group, almost 40% owned by the British taxpayer, was cut by one notch rather than the two that had been considered and it said the mooted change "would have limited impact on our funding costs and market capacity".

Morgan Stanley had its rating cut to Baa1, just three notches above the junk, or non-investment grade, status that many bond buyers avoid. Citigroup, which had its rating cut from A3 to Baa2, hit out at the agency, calling it "arbitrary" and "completely unwarranted". Goldman Sachs's rating was cut to to A3 from A1.

Moody's cuts came after US and European stock markets had all closed

down. In the US there was fresh evidence that the recovery in the jobs market was stalling while manufacturing slows. In Germany, Europe's strongest economy, private sector growth shrank for the second month in a row, according to a survey by Matrix analysts. Germany's manufacturing activity hit a three-year low, according to the survey.

The downgrades had been expected since February when Moody's announced a review of more than 100 financial institutions' financial health as a result of the eurozone crisis in a simultaneous review of 17 banks with major investment banking operations. Credit Suisse was hit hard by the full three notches it had faced.

Moody's cut its ratings on Spanish banks in May and Thursday's independent assessment of Spain's banks will be used by the government in Madrid to calculate the final sum when it makes its formal petition for bailout money from Europe's rescue funds.

The figures were well below the maximum of €100bn that eurozone governments have offered Spain to bail out banks that are still laden with toxic assets left over from a property bubble that burst four years ago.

Officials said the formal petition would come within days, but did not say what the final figure would be or whether the government would add a security cushion.

The studies, carried out by auditing companies Roland Berger and Oliver Wyman, covered 14 banking groups that account for 90% of the sector in Spain.

Officials hoped that the figures would help calm markets, which responded to the announcement of the bailout two weeks ago by putting further pressure on Spain's state borrowing costs.

"We hope this will be definitive," said the secretary of state for the economy, Fernando Jiménez. "We have a generous backstop and are already carrying out a very aggressive provisioning."

Markets had lost confidence in Spain's ability to judge its own banking needs after the two rounds of provisioning ordered so far this year failed to prevent the downfall of Bankia, the country's fourth biggest lender, now part-nationalised.

Bankia's new management has already said it needs an injection of €19bn of capital. "There was some uncertainty about the resistance of the system," Jiménez admitted. "This is an additional exercise in transparency."

Spain's borrowing costs had been falling in recent days but on Thursday the country still had to pay its highest interest rate for 16 years to raise money over three and five years.

The auditors did not produce figures for individual banks, though officials insisted that the study showed that the biggest three lenders – Santander, BBVA and Caixabank – would not need any injection of public capital. A second group of banks may be able to raise capital themselves or might prefer to ask for bailout money. A third group of lenders is made up of former savings banks, like Bankia, that have already received state support.

Analysts welcomed the results, but warned they were based on figures that are already six months out of date, in a country that is now in recession.

"The decision to bring in independent consultants to pore over the loan books of banks has injected much-needed credibility into the restructuring of Spain's banking sector," said Nicholas Spiro of Spiro Sovereign Strategy.

"The perception among foreign investors that the severity of the problems in the banking system are not being recognised is no longer justified."

Economy minister Luis de Guindos, who was in Luxembourg with eurozone colleagues to discuss Spain's request, said a formal application would be made within a few days.

Eurozone finance ministers offered Spain a bailout loan of up to €100bn on 9 June. The terms of the loan – for which the Spanish government, rather than the banks, will ultimately be responsible – still have to be negotiated.

• This article was updated on Friday 22 June to take in the downgrading of banks