The gains come as quarterly results are still trickling through, with technology in particular focus ahead of bellwether Intel Corp.'s earnings report after the close, while Washington Mutual's results, also after the close, kept the attention on financials.
"We didn't get another Wachovia today," said Owen Fitzpatrick, head of the U.S. equity group at Deutsche Bank.
Wachovia posted an unexpected quarterly loss Monday, a stark reminder of the credit-market troubles crippling results in the financial sector and elsewhere.
Crude futures hitting a new high near $114 a barrel also lifted the energy sector and provided support to the market.
The Dow Jones Industrial Average finished up 60 points at 12,362. Shares of Alcoa Inc. , Wal-Mart Stores Inc. and J.P. Morgan Chase and Co. led the gains on the blue-chip average.
Decliners included Boeing Co. , International Business Machines Corp. and Verizon Communications Inc. .
Chevron Corp. and Exxon Mobil Corp. also, in tandem with broad gains in the energy sector.
Also on the Dow, Johnson & Johnson fell 0.1% despite posting upbeat earnings, while Intel rose 0.7% ahead of its earnings late this afternoon.
"The market is digesting the whole banking and financial issues, but the market has still to digest the recession story, and how much of a damage to earnings we'll get," Fitzpatrick added.
The S&P 500 Index rose 6.1 points to 1,334, while the Nasdaq Composite Index gained 6.1 points to 2,286.
Trading volumes showed 1.2 billion shares trading on the New York Stock Exchange, with gaining issues topping decliners by 3 to 2. On the Nasdaq Stock Market, 789 million shares traded, with gainers topping decliners by 7 to 6.
On the economic front, manufacturers in the state of New York were once again positive about the economy in April, the New York Fed reported. The Empire State index jumped nearly 23 points in April to 0.6 from negative 22.2 in March.
Wholesale prices soared 1.1% in March, led by rising energy and food prices, the Labor Department reported. But the core producer-price index, which excludes volatile food and energy, rose only 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. Crude futures contracts hit a record $113.93 and finished up $2.03, or 1.8%, at $113.79
Earnings season also swung into full gear Tuesday as State Street 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 also were processing 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 had agreed to a $17.7 billion merger deal that would create the world's second-largest carrier after Air France-KLM in terms of assets, raising investor hopes that the emerging company will be better positioned to deal with the soaring fuel prices 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 Monday's closing prices.
Other airline stocks stumbled as crude oil prices continued to surge. The Amex Airline Index stumbled 4.3%, led by big declines in shares AMR Corp. , Continental Airlines and US Airways .
Also in the spotlight, shares of AstraZeneca PLC rose in London after the firm reached a settlement with Indian drugmaker Ranbaxy on a copycat version of itsdrug Nexium. Ranbaxy won't start making a generic version until May 2014.
Indian software giant Infosys Technologies Ltd. said current fiscal-year earnings would grow by at least 16% per share, matching market forecasts.
By Nick Godt