Microsoft's profits in the three months to the end of March dropped slightly but the results still beat analysts' expectations after a surprise rise in sales of its Windows operating system.
The world's largest software firm made a net profit of $5.11bn (£3.2bn), compared with $5.23bn a year earlier.
Sales rose by 6% to $17.41bn.
Windows sales rose 4% against forecasts of a 4% decline, though sales at its entertainment division, which includes the Xbox console, fell 16%.
Its business division saw revenues increase 9% "reflecting the continued strength of Office 2010", the company said.
Brendan Barnicle, analyst at Pacific Crest Securities, said the results looked good.
"Particularly good was the Windows business, which grew about 4%, more than PC industry growth. In the last few quarters, Windows has been growing less than PCs overall," he said.
"It's not clear yet what drove this change, but it could be that the negative impact on PCs from tablets has peaked. The Office business was particularly strong too, which is encouraging."
Microsoft shares rose 3% in after-hours trading in New York.
The company also noted that the results for the same quarter a year ago had been boosted by a $461m tax benefit.Hitting back
Windows is facing competition from the growth of tablet computers such as Apple's iPad and mobile devices using Google's Android system.
However, Microsoft is hitting back with the release of Windows 8, an operating system for PCs and mobile devices.
Earlier this week Microsoft said this next operating system would come in three different types.
For those with Intel-compatible machines, the OS will be available in two versions - Windows 8 and Windows 8 Pro.
And for those with devices, largely tablets, powered by ARM-designed chips, there will be a Windows RT version.
"We're driving toward exciting launches across the entire company, while delivering strong financial results," said chief executive Steve Ballmer, announcing the financial results.
"With the upcoming release of new Windows 8 PCs and tablets, the next version of Office, and a wide array of products and services for the enterprise and consumers, we will be delivering exceptional value to all our customers in the year ahead."