Microsoft announced a 4% jump in revenue Thursday versus the same quarter last year, ahead of the highly anticipated release of its Windows 8 operating system this fall.
Microsoft reported sales of $18.06 billion for its fiscal fourth quarter, which ended in June. Excluding deferred revenue tied to a Windows 8 upgrade promotion that expires in January, sales came in at $18.6 billion. That topped analysts forecasts of $18.1 billion.
Shares of Microsoft rose 2.4% in after-hours trading.
But the company also posted a net loss of $492 million in the quarter, due mainly to the previously announced $6.2 billion writedown in connection with its 2007 acquisition of online display advertising company aQuantive. Microsoft's operating profit before the writedown was $6.9 billion.
Excluding all the one-time charges, Microsoft posted earnings of 67 cents a share. That's ahead of Wall Street's consensus estimates of 62 cents a share
For its 2012 fiscal year, Microsoft reported $74.3 billion in revenue excluding special items, a new record. Earnings per share on the year were $2.78.
The results come ahead of the October 26 release of Microsoft's first tablet PC, the Surface, and its biggest update to Windows in nearly two decades.
"We're fast approaching the most exciting launch season in Microsoft history," Microsoft CEO Steve Ballmer said in a statement.
Microsoft still hasn't announced pricing for Windows 8 or Surface, but the company is allowing PC users running Windows XP, Vista or 7 to upgrade to Windows 8 for $40 during a promotion that lasts until the end of January 2013. People who buy Windows 7 PCs between now and January can upgrade to Windows 8 for $15.
The Surface, which Microsoft is manufacturing itself, represents a drastic shift from Microsoft's historic strategy of relying on hardware partners like Dell and HP to make its actual devices. The hope is that it will allow the company to break the stranglehold that Apple's wildly popular iPad has on the tablet market.
Apple has declared that we're now in a "post-PC" world. Whether or not that's the case, PC sales have certainly been struggling lately.
Microsoft's numbers reflected this slump, with revenue from its Windows division down $58 million versus the same quarter last year after factoring in the deferral from the Windows 8 upgrade offer.
Demand for PCs has been slumping in the United States for several years. But the really bad news for the sector is that the Chinese market is beginning to cool off.
China had been a strong source of PC demand, as many consumers there were buying a computer for the first time, but a weakening global economy is stunting growth.
Microsoft will also need to figure out how to make more money online. Even after excluding the aQuantive writedown, Microsoft's online services division, which includes the Bing search engine, lost roughly $472 million in the quarter.
Meanwhile. rival Google reported results that topped forecasts on Thursday.