NEW YORK (CNNMoney) -- 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 a deferral of revenue tied to a Windows 8 upgrade promotion that expires in January, sales came in at $18.6 billion.
Shares of Microsoft (Fortune 500) rose 2.4% in after-hours trading.,
But the company also posted a net loss of $492 million in the quarter, the first in its 26-year history as a public company. The loss was mainly from Microsoft's 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 the aQuantive charge, 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 written 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 (Fortune 500) and HP ( , Fortune 500) to make its actual devices. The hope is that it will allow the company to break the stranglehold that Apple's ( , Fortune 500) 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.
|What we want Apple to unveil at WWDC|
|Millennials squeezed out of buying a home|
|7 traits the rich have in common|
|Big Data knows you're sick, tired and depressed|
|Your car is a giant computer - and it can be hacked|