Dividend and bonus cuts, profits, and aid from the IMF will provide most of the new capital Europe's banks need after the eurozone deal struck overnight, leaving them as little as 20 billion euros to find from investors.

Politicians told banks to find 106 billion euros ($146 billion) in new capital by the end of June to shore up their balance sheets -- part of a plan to restore confidence in the sector and halt a eurozone debt crisis from spreading.

News of the agreed plan, and comments from major banks that they can meet shortfalls without outside help, sent banks shares soaring over 9 percent on Thursday for their strongest one-day climb in more than two years.

After tense talks that began Wednesday and ran into the early hours, private sector investors also agreed to halve the value of their Greek government debt holdings -- taking a collective 103 billion euro hit -- which marked a breakthrough for EU leaders.

It's short on detail but it's progress, said Simon Maughan, head of trading for Europe at MF Global.

There's a fairly defined timeline to deal with this. The banks have to raise all of the money by the end of June, so they've got to get on with it, he added.

By 1530 GMT the STOXX European bank index was up 8.9 percent at an 11-week high of 149 points, putting it on course for its biggest daily rise since May 2010.

The index has jumped by a quarter in the last five weeks.

WHO NEEDS CAPITAL?

Banks in Spain, Italy, France, Portugal, Greece and beyond were told they need to recapitalise to be able to better withstand eurozone sovereign bond losses and an economic downturn.

But of the sum needed, 30 billion euros is already being provided to Greek banks under an International Monetary Fund (IMF) aid plan, and Portugal's banks, which need 7.8 billion euros, can also tap an IMF aid package.

Belgium's Dexia and Austria's Volksbanken need almost 7 billion combined but are already getting government help.

Spain's Santander can meet 8.5 billion euros of its capital need with an existing convertible bond.

Asset sales and debt liability management plans will provide further cash. Some deleveraging (reduced lending) -- as long as it is not what the European Banking Authority (EBA) deems excessive -- will lift capital ratios further.

With retained earnings and dividend cuts banks could need to raise less than 30 billion euros from investors, bankers said.

Credit Suisse analysts put the figure as low as 20 billion euros, after allowing for 25 billion euros from earnings and the saving of 6 billion euros on dividends.

Still, with European bank shares trading at an average 0.6 times book value, any capital raising would be painfully dilutive.

The 106 billion total required was in line with expectations, though Spanish banks need more than many analysts' forecast, at 26 billion euros.

Santander said its capital shortfall is 15 billion euros, or 6.5 billion after the convertible bond benefit. Peer BBVA needs 7.1 billion euros and Banco Popular
needs 2.4 billion.

Even so, analysts said the exercise had failed to address the root cause of Spanish banks' capital needs -- their hefty exposure to toxic real estate assets.

Our main concern remains about the pending clean-up of the real estate and developer exposure for Spanish banks, which requires an additional recap of up to 45 billion euros, said Francisco Riquel, analyst at N+1 Equities.

We doubt that debt markets will open up for Spanish banks at reasonable prices, and we thus expect the credit crunch to accelerate.

The EBA said it would help re-open the medium-term funding market for banks which have been shut out, putting in place a public guarantee scheme. But again, there were few details.

Seventy banks were tested under the recapitalisation plan. The EBA did not break down how much each lender needs, leaving that to the banks and national regulators.

France's BNP Paribas requires 2.1 billion euros, Societe Generale needs 3.3 billion and BPCE, the mutual that owns Natixis , is in need of 3.4 billion.

Germany's Commerzbank needs 2.9 billion and Deutsche Bank is expected to need 1.2 billion. Italy's UniCredit could need near 5 billion euros.

Sweden's Handelsbanken and Swedbank need to raise a combined 1.3 billion euros, hurt by a greater risk weighting applied to their mortgage portfolios.

We want to see a combination of measures. We don't want to just see that measures taken are, for example, reducing lending, said Martin Noreus, the head of large bank supervision at Sweden's financial regulator.

Shares in BNP Paribas and SocGen rallied over 14 percent and Deutsche Bank and Commerzbank each jumped 12 percent due to their modest capital needs. Credit Agricole leapt 18 percent and Barclays added 14 percent as they did not need funds.

($1 = 0.724 Euros)

(Additional reporting by Lionel Laurent, Edward Taylor, Sarah White, Oskar von Bahr and Mia Shanley; Editing by David Hulmes and Andrew Callus)