With Apple's help, the technology-focused Nasdaq posted its best day this year.
Apple, the biggest component of the index by far, climbed 8.9 percent after reporting that its earnings doubled in the first three months of the year. The company sold 35 million iPhones, twice as many as in the same quarter a year ago.
The surge made back about half of what Apple's stock lost in the two weeks before its earnings announcement late Tuesday. One reason for the slump was an analyst's suggestion that Apple could not keep up the momentum in iPhone sales.
Stock in Apple, the most valuable public company in the world, hit $644 in intraday trading on April 10 and slid as low as $555 on Tuesday.
Apple jumped nearly $50 to $610 on Wednesday. The gain helped power the Nasdaq up 68.03 points to 3,029.63. Apple makes up 12 percent of the Nasdaq.
The Dow gained 89.16 points to close at 13,090.72, a 0.7 percent increase. The S&P 500 index rose 18.72 points, or 1.4 percent, to 1,390.69. Apple accounts for 4 percent of the S&P 500.
The tech giant joined a growing list of companies that have reported surprisingly strong first-quarter earnings. Through last week, eight out of 10 companies that reported earnings had beat estimates, including Microsoft, IBM and Coca-Cola. Even so, the S&P 500 index is still down 1 percent for the month.
"Sure, earnings are a lot better than expected, but this looks like a quarter where the market doesn't react to that," said Brian Gendreau, market strategist at Cetera Financial. "I don't think that the positive earnings season we've had is enough to shake this market out of its trading range."
Technology stocks in the S&P 500 gained 3 percent as a group, the best-performing industry in the market. Material and consumer-discretionary companies also had a strong day.
Financial markets barely budged after the Federal Reserve said it would stick with its plan to keep a key short-term interest rate near zero. The Fed detailed no plans to extend its bond-buying program when the current iteration ends in June.
The yield on the 10-year Treasury note increased slightly following the Fed's announcement. Gold prices fell and the dollar inched up against other currencies. Stock indexes stayed where they were.
Some European markets posted strong gains. Benchmark stock indexes rose 3 percent in Italy and 2 percent in France. Germany's market gained 1.7 percent. British shares rose just 0.2 percent following news that the British economy fell back into recession for the first time since 2009.
For Europe, Apple may not be an economic bellwether, but analysts said it's a valuable gauge of confidence in markets.
Among other stocks making moves:
— Boeing rose 5 percent, the best performer among the 30 stocks that make up the Dow. Its first-quarter profit soared 58 percent. Airlines around the world are updating their fleets with more fuel-efficient planes.
— Harley-Davidson jumped 6 percent. U.S. sales of the company's motorcycles soared 26 percent in the first three months of the year, the fourth straight increase. The company credited the gain to a better U.S. economy and a restructuring program the company put in place four years ago.
— Lorillard fell 4 percent after the cigarette maker reported a 10 percent drop in income for the first quarter. The company said higher prices couldn't make up for a fall in sales of its Newport and Maverick cigarettes.