Microsoft posted its first ever loss on Thursday, shedding $492 million in the fourth quarter due to a massive $6.2 billion write-down to reflect the slump in value of its online operations.
Microsoft still posted an annual profit of $16.98 billion and said the results reflected "solid revenue growth and rigorous cost discipline."
The Redmond, Washington-based firm had announced earlier this month it would take the $6.2 billion write-down, which is required by accounting rules and does not affect the company's cash position.
Taking out one-time charges, Microsoft showed a profit of 73 cents a share, well ahead of Wall Street expectations of 62 cents.
Revenue also beat expectations, rising four percent to $18 billion in the quarter to June 30. For the full year, revenues were up five percent at $73.7 billion.
"We delivered record fourth quarter and annual revenue, and we're fast approaching the most exciting launch season in Microsoft history," said Steve Ballmer, chief executive of Microsoft.
The company is preparing to release a new version of its leading Windows operating system and a new tablet computer, while making an aggressive move into smartphones.
"The combination of solid revenue growth and rigorous cost discipline drove double-digit operating income growth for the quarter, adjusting for the goodwill impairment and deferred revenue," said Peter Klein, chief financial officer.
"We are focusing our resources in strategic areas that will deliver shareholder value and long-term growth opportunities."
Microsoft shares rose 2.14 percent to $31.32 in after-hours electronic trades.
The fourth quarter losses stemmed from a charge reflecting a write-down related to the 2007 acquisition of aQuantive, a digital advertising firm aimed at helping Microsoft compete against Google and others.
Microsoft announced the deal in August 2007 in a move aimed at seizing market share from rivals Yahoo! and Google in the lucrative market that tailors advertising to Internet search results.
Microsoft's Windows remains the dominant platform for personal computers, but it has lost ground to rivals such as Google and Apple in newer devices, which use rival operating systems.
The company's search and online services have struggled, while its Xbox gaming system has become among the hottest in the industry.
In its latest results, business services accounted for $6.3 billion in revenue and $4.1 billion in operating profits. Windows showed an operating profit of $2.4 billion on $4.1 billion in revenue.
But the entertainment unit showed an operating loss of $263 million on revenues of nearly $1.8 billion. And online services showing a whopping loss of $6.6 billion and revenues of just $735 million.