Microsoft closed up $5.10, or 7.6 percent, to $71.60.
The software giant said earnings from operations would be in line with its previous forecast excluding one-time items. First Call consensus predicts a profit of 42 cents a share, excluding charges. Including charges, Microsoft expects to report a profit of a penny per share.
Microsoft expects revenue for the quarter to range from $6.5 billion to $6.6 billion, higher than its previous estimate of $6.3 billion to $6.5 billion. Wall Street analysts expected Microsoft to report revenue of $6.46 billion, according to First Call.
The news from the company wasn't all good. Microsoft plans to report an investment loss of $2.6 billion for the fourth quarter, stemming from a one-time charge of $3.9 billion. The company said the charge reflects a drop in the value of its stock portfolio, especially in cable and telecommunications issues.
Although that write-off is a big one, investors were forgiving since Microsoft gave them a rare dose of good news amid a host of profit warnings. There was speculation that Microsoft would miss its quarter due to sluggish sales in Europe and weak PC demand.
Analysts said Microsoft could write down more of its portfolio, but added that news of better-than-expected sales outweighs the investment charge. The charge accounts for about 22 percent of Microsoft's investment portfolio, according to Greg Vogel, an analyst at Banc of America Securities.
"The fourth-quarter results will undoubtedly bring a sigh of relief from any investors that were worried about Microsoft missing the quarter and certainly set a solid precedent for the balance of the year," said Drew Brosseau, an analyst at SG Cowen Securities.
Credit Suisse First Boston analyst Wendell Laidley upgraded Microsoft from a "buy" to a "strong buy" on the news.
While admitting that Microsoft didn't provide a lot of detail in its announcement Wednesday, Laidley said the company was benefiting from higher average selling prices for Windows 2000. Improving PC growth rates over the next six to 12 months and new products such as Windows XP and .Net servers should continue to boost results, he said.
But not every Wall Street analyst was so upbeat. Some analysts have been cautious about the immediate future for Microsoft, especially because its stock price is up more than 25 percent since late March.
Brosseau acknowledged that Microsoft has been able to deliver in a tough economic environment, but maintained his "neutral" rating. He said Microsoft is "still held hostage" by PC growth rates, which may not improve. In fact, Merrill Lynch analyst Henry Blodget lowered his estimates for Microsoft ahead of the company's announcement based on weak PC sales.
In addition, Brosseau said Microsoft's stock price isn't likely to go much higher from here. Brosseau also noted that Microsoft's revenue may have gotten a boost from the acquisition of Great Plains Software, a deal that closed April 5.
Goldman Sachs analyst Rick Sherlund kept Microsoft on the brokerage's recommended list, but noted that the company didn't give any hints about future revenue growth, PC demand or the outlook for Europe.
Sherlund said those topics are likely to be covered on the company's earnings conference call. Microsoft is scheduled to report complete fourth-quarter results July 19.