Microsoft on Thursday reported a profit in the past quarter of $4.5 billion, as the tech giant rebounded from its first-ever loss.
The profit was down 21 percent from the same period a year ago but came after a loss of $492 million in the prior quarter.
The earnings in the first fiscal quarter ended September 30 amounted to 65 cents a share, better than Wall Street forecasts of 56 cents. But revenues were below expectations, falling eight percent to $16 billion.
The earnings come with Microsoft preparing a series of major product launches designed to reinvigorate what was once the world's biggest tech firm.
Microsoft next week launches its Windows 8 operating system designed for PC market it dominates.
But it also will be launching its own tablet computer called Surface, taking on Apple and others. And it is rebooting its mobile platform with Windows Phone 8, aimed at gaining traction in the smartphone market.
"The launch of Windows 8 is the beginning of a new era at Microsoft," said Steve Ballmer, chief executive officer at Microsoft.
"Investments we've made over a number of years are now coming together to create a future of exceptional devices and services, with tremendous opportunity for our customers, developers, and partners."
Windows remains the dominant platform for personal computers, but it has lost ground to Google and Apple in newer devices, which use rival operating systems.
The company's search and online services have struggled, but its Xbox gaming system has become the hottest in the industry.
Earlier this year, Microsoft took a $6.2 billion write-down, which is required by accounting rules to reflect the lower value of its assets but and does not affect the company's cash position.
Microsoft said its Windows unit saw a 33 percent revenue slump, reflecting lower sales in anticipation of the new operating system.
Revenues for its Xbox entertainment and devices division fell one percent, but Microsoft said Xbox "continues to be the top-selling console in the US, where it now has 49 percent market share."