Just after the closing bell IBM dramatically increased its full-year profit forecast to $9.70 per share.
The forecast had been $9.20 per share.
Check out the number for yourself on the company Website. http://www.ibm.com/investor/2q09/index.phtml
Economic experts say those guidance numbers are the most important news to come from the earnings report.
CNBC Silicon Valley Bureau Chief Jim Goldman said IBM "Blows Wall Street Away." Goldman said it is the biggest beat in IBM's history.
The upgrade is a rare sign of confidence from a major Silicon Valley corporation in the middle of a recession.
IBM believes it can continue wringing out more profit from its services and software divisions, even as sales suffer.
The technology company said it had a second-quarter profit of $3.1 billion, or $2.32 per share. That was up 12 percent over last year and well ahead of analysts' projections for $2.02 per share.
Sales fell 13 percent to $23.25 billion. Analysts expected $23.59 billion.
Even ahead of IBM's good news, the tech-heavy Nasdaq advanced for the seventh straight day and closed at its highest level since October.
Stocks continued the week's sprint-and-jog play, carving more modest gains after surging the day before. Stocks surged on Monday followed by a flatter day Tuesday.
Dan Deming, a trader with Strutland Equities in Chicago, said tech stocks rose because investors were afraid they would miss out on Google and IBM, which both reported better-than-expected results after the closing bell.
"It's kind of feeding on itself because you're seeing these earnings come in from the tech sector, particularly, showing pretty good numbers," he said.
The jump in stocks this week halted a month long slide that came as investors worried that a huge rally in March and April on hopes for an economic recovery had gone too far. This week's earnings reports have given investors some of the confirmation that the economy isn't as bad as feared, but they still want to see more evidence of a turnaround.
According to preliminary calculations, the Dow rose 95.61, or 1.1 percent, to 8,711.82. The Standard & Poor's 500 index rose 8.06, or 0.9 percent, to 940.74.
The Nasdaq composite index rose 22.13, or 1.2 percent, to 1,885.03, its best finish since Oct. 3.
Bond prices rose. The yield on the benchmark 10-year Treasury note, which moves opposite its price, fell to 3.58 percent from 3.62 percent late Wednesday.
Investors looked past a stronger profit report from JPMorgan Chase & Co., which reported big gains in its investment banking business, held back somewhat by loan losses.
"A lot of the good news has been priced in and the market really needs to see more evidence that there is strong momentum in the financials," said Nick Kalivas, vice president of financial research at MF Global.
Financial stocks lagged the rest of the market after small-business lender CIT Group Inc. said negotiations with federal regulators about a rescue broke off. Investors are worried the company could file for bankruptcy protection. CIT tumbled $1.23, or 75 percent, to 41 cents.
JPMorgan said it generated record revenue, spurred on by strong investment banking operations. Its results come two days after Goldman Sachs Group Inc. also topped expectations with much stronger results in underwriting and trading. JPMorgan slipped 13 cents to $36.13.
Strong earnings from the banks have encouraged investors about the economy. The results also show that many of the nation's biggest banks have quickly recovered from the collapse of credit markets last fall that led to the failure of Lehman Brothers and near collapse of American International Group Inc.
Ahead of their reports, Google rose $4.43, or 1 percent, to $442.60, while IBM rose $3.42, or 3.2 percent, to $110.64.
In economic news, the Labor Department said new claims for unemployment insurance plunged last week by 47,000 to 522,000, the lowest level since early January. Economists polled by Thomson Reuters predicted an increase to 575,000. The improved data, however, might have been affected by the timing of automobile plant shutdowns.
The dollar fell against other currencies. Gold prices fell.
Benchmark crude rose 48 cents to settle at $62.02 a barrel on the New York Mercantile Exchange.
About two stocks rose for every one that fell on the New York Stock Exchange, where volume came to 1.2 billion shares, compared with 1.4 billion shares traded Wednesday.
The Russell 2000 index of smaller companies rose 6.38, or 1.2 percent, to 522.02.
Overseas, Britain's FTSE 100 rose 0.4 percent, Germany's DAX index rose 0.6 percent, and France's CAC-40 gained 0.9 percent. Japan's Nikkei stock average rose 0.8 percent.