Crude oil hitting new highs near $114 also lifted the energy sector.
The Dow Jones Industrial Average gained 69 points to 12,371, with 21 of its 30 components rising.
Financial stocks powered the advance in the broad market and on the Dow, with gains led by Citigroup Inc. , JP Morgan Chase and Bank of America . Bear Stearns , which is being bought by J.P. Morgan, said its quarterly profit fell 79%.
Chevron Corp. and Exxon Mobil Corp. also gained ground, along with broad gains in the energy sector.
Also on the Dow, Johnson & Johnson rose 0.2% after posting upbeat earnings, while Intel Corp. fell 0.3% to $65.56, ahead of its earnings after the close.
The S&P 500 index rose 4.7 points to 1,333, while the Nasdaq Composite gained 7.7 points to 2,283.
U.S. stocks closed with mild losses on Monday, pulling back after Wachovia announced a $7 billion share offer and an unexpected quarterly loss. The Dow industrials fell 23 points, the Nasdaq Composite sank 14 points and the S&P 500 lost 4 points.
On the economic front, manufacturers in New York state were once again positive about the economy in April, the New York Federal Reserve Bank reported. The Empire State index jumped by nearly 23 points in April to 0.6 from negative 22.2 in March.
Wholesale prices jumped 1.1% in March, led by rising energy and food prices, the Labor Department reported. The core producer price index, which excludes volatile food and energy, rose 0.2%. Economists surveyed by MarketWatch had expected the PPI to rise 0.4% and the core to rise 0.2%.
The dollar strengthened slightly after the data, while crude futures spiked to a fresh high. Light crude futures contracts hit $112.97 and were recently up $1.04 a barrel at $112.80, helped by supply disruptions.
Earnings season also swung into full gear Tuesday as State Street Corp. reported a 69% rise in first-quarter net income, to $530 million, or $1.35 a share. Adjusted earnings were $1.39, topping the $1.30 expected by analysts.
Investors were also digesting what the proposed merger of Delta Air Lines Inc. and Northwest Airlines Corp. would mean for other U.S. carriers.
Delta and Northwest said Monday that they have agreed to a $17.7 billion merger deal in what would create the world's second-largest carrier, raising investor hopes that the emerging company will be better positioned to deal with the soaring price of fuel and a more competitive global environment.
Northwest shareholders are to receive 1.25 Delta shares for each share they own, representing a 16.8% premium over April 14 closing prices.
Also in the spotlight, shares of AstraZeneca rose in London after reaching a settlement with Indian drugmaker Ranbaxy on a copycat version of its drug Nexium. Ranbaxy won't start making a generic version until May 2014.
Indian software giant Infosys Technologies said current fiscal-year earnings per share would grow by at least 16%, matching market forecasts.
By Nick Godt