Microsoft has posted its first quarterly loss in its 26 years as a public company as it declared a struggling online ad business a bust and prepared for one of the biggest product updates in its history.
The software giant had warned two weeks ago that it would take a 6.2 billion (£3.9 billion) charge in the April-June quarter because its 2007 purchase of online ad service aQuantive failed to help it compete with Google. The amount reflected the bulk of the 6.3 billion-dollar (£4 billion) acquisition cost.
The online ad business remains just a tiny part of Microsoft - comprising just 4% of its annual revenue. Most of the company's sales come from its Office suite of productivity software, Windows operating system and, increasingly, computer servers.
Upbeat business software and server sales in the quarter helped offset a flat market for personal computers, which had put a damper on Windows sales. Taken as a whole, the software giant's results beat analyst expectations.
Shares rose 2.4% to 31.39 dollars in after-hours trading following the earnings announcement.
Excluding the adjustment and the deferral of some revenue related to its forthcoming Windows 8 operating system, earnings came to 73 cents per share. Analysts polled by FactSet were looking for 62 cents per share of earnings on revenue of 18.15 billion dollars.
Microsoft's fortunes are now tied to the October 26 release of Windows 8, the most extreme redesign of the company's flagship operating system since 1995.
Windows 8 will feature a new look and boast new technology that will enable the operating system to work on touch-controlled tablet computers, as well as Microsoft's traditional stronghold of desktop and laptop computers.
In conjunction with Windows 8, Microsoft is planning to release its own tablet, the Surface.