Five of the 30 big companies that make up the Dow Jones industrial average rose more than 1.5 percent. AT&T led the gains after reporting better-than-expected profit. Verizon, AT&T's main rival, was close behind. 3M rose sharply after delivering an impressive quarterly report. GE and DuPont rounded out the list of top gainers.
Traders punished Apple after AT&T said it activated far fewer of Apple's iPhones. Apple fell two percent, dragging the Nasdaq composite average to a lower close. Apple shares recovered the day's losses several times over in after-hours trading after the company announced another record quarterly profit that easily beat analysts' forecasts.
Chocolate maker Hershey and regional bank Regions Financial helped boost the Standard & Poor's 500 index after both companies outpaced Wall Street's estimates.
Earnings reports are blowing the tops of analysts' expectations, providing temporary relief for markets roiled by fears about Europe, said Sam Stovall, chief equity strategist with financial-data firm S&P Capital IQ. He said analysts had expected only a half-percent profit increase for the S&P 500 this quarter. Based on the results so far, he said, the gain could be ten times bigger.
"These are legitimately strong results, and in retrospect, the bar was set too low," Stovall said.
The gains for blue chips were broad. Only five Dow components fell, led by Wal-Mart Stores. The world's biggest retailer is reeling from reports over the weekend that top company officials knew about widespread bribery of foreign officials.
European stocks rallied into the close a day after one of their worst drops in months. Monday's sell-off followed fears that deficit-cutting deals by some European nations might unravel.
On Tuesday, as Monday's panicked atmosphere lifted, interest rates on Spanish bonds already in circulation declined. France's CAC-40 index closed up 2.3 percent. Germany's DAX rose one percent, London's FTSE 100 0.8 percent.
Still, there were signs that Europe's troubles persist. Bond investors demanded much higher interest rates from Spain and Italy when they auctioned new debt, suggesting that there is more pain ahead for those debt-strapped countries.
Stovall expects fears about Europe to overshadow earnings results in the coming weeks. After months of strong stock-market gains and little talk about Europe, traders are again nervous that the crisis will boil over, harming the global economy and gumming up the financial system, he said.
"First-quarter earnings are helping to justify the equity market's advance since early October," Stovall said, but "if Europe continues to have its problems, that will outweigh" the corporate earnings news.
Stocks rose consistently from early October through the end of the first quarter on March 31. Trading has since turned volatile. Swings of more than 100 points in the Dow have become common, a contrast to the steady, modest gains of the first three months of the year.
The Dow closed up 74.39 points, or 0.6 percent, at 13,001.56. IBM rose solidly after the company said it is raising its quarterly dividend and plans to repurchase $7 billion more of its stock.
The S&P 500 rose 5.03 points, or 0.4 percent, to 1,371.97.
The Nasdaq composite average fell 8.85 points to 2,961.60. Apple is the Nasdaq's biggest component and the biggest company by market value.
As stocks rose, traders sold ultra-safe Treasurys. The yield on the 10-year Treasury note rose to 1.97 percent from 1.94 percent late Monday.
Among the other U.S. companies swinging on earnings news:
— Oilfield services contractor Baker Hughes rose 5 percent after its profit exceeded expectations because of strong drilling activity in Africa.
— Coach fell 4 percent after the maker of high-end leather goods said results in U.S. department stores were weak, despite stronger sales in China.
— Netflix plunged 14 percent after saying it is adding new subscribers slowly in the second quarter. Investors are nervous about stronger competition from video-streaming rivals such as Amazon.com and Comcast.
A wave of weak U.S. economic data failed to douse the rally for stocks. Sales of new homes fell by 7 percent last month, the biggest decline in a year, the government said after markets opened. Home prices in most major U.S. cities fell in February for a sixth straight month.
Americans' confidence in the economy held steady despite rising gas prices and falling home values, according to the Conference Board, a private research group.
Daniel Wagner can be reached at www.twitter.com/wagnerreports.