Microsoft on Thursday announced its financial results for the second calendar quarter of 2012, or its fourth quarter of fiscal 2012, reporting record revenues of $18.6 billion. Thanks to a $6.2 billion write-down related to its 2007 purchase of online advertising company aQuantive, however, Microsoft also reported its first-ever quarterly loss, of $492 million. Otherwise, the software giant would have reported a profit of about $6 billion.

“We delivered record fourth quarter and annual revenue, and we’re fast approaching the most exciting launch season in Microsoft history,” said Microsoft CEO Steve Ballmer in a prepared statement. “Over the coming year, we’ll release the next versions of Windows, Office, Windows Server, Windows Phone, and many other products and services that will drive our business forward and provide unprecedented opportunity to our customers and partners.”

There were few surprises in the results.

Windows revenue declined 13 percent year over year, mostly because of a one-time $540 million deferral from its the Windows 8 Upgrade Offer, which lets purchasers of new PCs upgrade to the next Windows version for a small fee. Excluding that, the business was down only 1 percent year over year, though Microsoft estimates that PC sales were flat in the quarter. For the fiscal year, Microsoft’s Windows revenues declined 3 percent. Windows 8 is scheduled for release on October 26.

The Microsoft Business Division, which is responsible for Office, grew 7 percent in both the quarter and the fiscal year. Microsoft announced that Office was now installed on over 1 billion PCs around the world and the company this past week announced the next version, Office 2013, which should be released in early 2013.

Server & Tools revenues grew 13 percent in the quarter and 12 percent for the full year. Microsoft reported particularly strong sales of SQL Server 2012, which was launched in the quarter. And Windows Server 2012 will ship in September.

Revenues at the Online Services Division grew 8 percent for the quarter and 10 percent for the year. Bing’s share of the US search market is now 15.6 percent, Microsoft reports, with combined Bing and Yahoo searches hitting 26 percent of the market. The aQuantive writedown was taken against the OSD, otherwise it would have reported an operating profit of $300 million.

The Entertainment & Devices Division, which is responsible for Microsoft’s Xbox business, grew 20 percent in the quarter and 8 percent for the full year. The Xbox 360 has been the top selling video game console for 18 straight months now, though sales are slowing: Microsoft shipped 1.1 million consoles in quarter, down from 1.7 million in the same quarter a year earlier.