Stocks rose on Tuesday as IBM's dividend boost and reassuring data that could point to a bottom in the slow economic cycle offset worries that major banks may need to raise more money.

Worries lingered over the economic impact from the threat of a flu pandemic, as New Zealand and Israel were the latest countries to confirm cases of a new strain of flu linked to dozens of deaths in Mexico.

International Business Machines Corp gave the Dow its biggest boost, up 1.9 percent at $101.80 after its board approved a 10 percent increase in its dividend and authorized a stock buyback, highlighting resilience in a tough economic climate.

The Wall Street Journal reported that U.S. regulators have told Bank of America Corp and Citigroup Inc they may need to raise more capital. The shortfall amounts to billions of dollars at BofA, the newspaper said, citing people familiar with the bank. The paper added it is likely the U.S. Federal Reserve will have determined that other banks might also need more capital.

Two days in a row, where you walked in with a pretty weak preopening market largely driven by what's gone on overseas, swine flu, etc and we managed to come back -- that's a sign of a healthy market, said Kevin Kruszenski, head of listed trading at KeyBanc Capital Markets in Cleveland.

A lot of this (bank decline) has been telegraphed -- banks have started to retreat and digest a little bit of the move that they've had, they've had a pretty nice move off the bottom.

The Dow Jones industrial average <.DJI> gained 47.86 points, or 0.60 percent, to 8,072.86. The Standard & Poor's 500 Index <.SPX> rose 4.63 points, or 0.54 percent, to 862.14. The Nasdaq Composite Index <.IXIC> added 5.24 points, or 0.31 percent, to 1,684.65.

Citigroup is talking to the U.S. government about its capital levels after receiving early results of its stress test, but if it needs more capital, the bank does not expect to get it from the government, people familiar with the matter told Reuters.

Bank of America shares tumbled 6.2 percent to $8.38 and was the top weight on the blue-chip Dow, while Citigroup lost 5.2 percent to $2.91, but both were off session lows. The KBW Bank index <.BKX> slid 0.9 percent.

On Nasdaq, shares of Dendreon were halted, down 45.2 percent at $11.81, after a closely watched study showed the company's experimental cancer vaccine improved three-year survival of patients with advanced prostate cancer by 38 percent, compared with a placebo.

On the economic front, a report showed prices of single-family homes fell in February, but the rapid pace of decline slowed.

An April index of consumer confidence rose to its highest this year with some expectations that the recession is reaching a bottom.

(Reporting by Chuck Mikolajczak; Editing by Jan Paschal)