While most corporate results topped expectations, some high-profile misses, including Exxon and Aetna, kept a lid on gains.
Pending home sales rose to a near two-year high in March, but investors also had to contend with data showing a stumbling labor recovery as weekly initial jobless claims fell slightly but missed forecasts.
With 254 companies in the S&P 500 reporting, more than 72 percent have topped estimates, according to Thomson Reuters data. A big beat from Apple Inc drove Wednesday's rally, which gave the Nasdaq its best day of the year.
Weapons maker Lockheed Martin Corp. and online jobs recruiter Monster Worldwide Inc both had higher-than expected earnings. Lockheed added 1 percent to $91.91 and Monster jumped 16.7 percent to $9.52.
But Exxon Mobil Corp. and Aetna Inc. reported a drop in profits from the year-ago quarter, while United Parcel Service Inc's revenues missed Wall Street's expectations.
Exxon fell 1.1 percent to $85.93, Aetna slid 8.8 percent to $45 and UPS lost 3 percent to $77.27.
These are among the first blue chips to really miss this season, and that's putting some pressure on us, said Timothy Hoyle, director of research at Haverford Investments in Radnor, Pennsylvania.
I think earnings are enough to support a higher market, perhaps up to 1,450 (for the S&P), but the focus today is on who is and isn't delivering, compared to expectations.
The Dow Jones industrial average <.DJI> was up 93.62 points, or 0.72 percent, at 13,184.34. The Standard & Poor's 500 Index <.SPX> was up 6.84 points, or 0.49 percent, at 1,397.53. The Nasdaq Composite Index <.IXIC> was up 15.76 points, or 0.52 percent, at 3,045.39.
Wal-Mart Stores Inc , grappling with a bribery probe of its Mexican operation, was one of the Dow's top gainers. Wal-Mart's stock climbed 3.2 percent to $59.17 in a rebound from recent weakness. The retailer's stock was still down more than 5 percent for the week.
Wednesday's rally helped to purge a lot of April's losses brought on by investors' worries over prospects of a seasonally weak market in May as well as signs that Europe's debt crisis was getting worse.
The S&P 500 was back above its 50-day moving average after swinging back and forth around the 1,378.25 level for several sessions. The benchmark index had pulled back as much as 4.2 percent from its 2012 closing high set on April 2.
Colgate-Palmolive Co. slipped 0.3 percent to $99.29, even as sales topped expectations, while PepsiCo Inc shed 0.6 percent to $66.28 after earnings fell slightly but still topped estimates.
Shares of Whirlpool Corp., the world's largest appliance maker, dropped 4.1 percent to $66.05 after sales declined and it missed estimates.
On the upside, Citrix Systems Inc. surged 11.6 percent to $86.10 a day after reporting strong net income, prompting analysts to raise estimates for the business software company.
(Editing by Jan Paschal)