Net income for the second quarter of 2002 ending 31 December was $2.28bn (£1.59bn), including a one-off $660m (£460m) charge for expenses in connection with consumer class action lawsuits.
Revenue came in at $7.74bn (£5.4bn), an 18% increase over the same quarter last year. Thomson Financial/First Call was expecting Microsoft to rake in revenue of $7.27bn.
Microsoft earned $0.47 per share on revenue of $6.6bn in the second quarter of 2001.
Since the launch of Windows XP on 25 October, more than 17 million copies have been sold by computer manufacturers on new personal computers and by retailers, Microsoft said.
"It was the most successful launch of an operating system in our history," said Scott Boggs, Microsoft corporate controller.
Sales of the operating system by computer manufacturers were more than 300% higher than those of Windows 98 and 200% higher than those of Windows Millennium Edition over an equivalent period, the company said.
While its operating system sold well, desktop software revenue declined from $2.48bn in the same quarter last year to $2.45bn in the reported quarter, mainly due to slow sales of its Office XP software. Server platform software sales grew 2% and server application revenue grew 9%, Boggs said.
The company cited strong sales for its .net enterprise servers, with new customers including Verizon Communications, but most of the revenue from those sales will be deferred to future quarters, Microsoft said.
Looking ahead, Microsoft said revenue for the third quarter ending 31 March is expected to be in the range of $7.3bn to $7.4bn.
Those results depend on IT spending to stay at current levels, the launch of the Xbox in Asia to go as expected, and PC shipments not to fall further than already accounted for. "We don't see a booming economy anytime soon," Connors said.
Total PC demand declined about 5% for the quarter, slightly worse than the company expected at the start of the period, Microsoft said. All major economies around the world reflected the weakening PC sales, and will continue to be weak in the coming two quarters, Connors predicted.
"We now believe [worldwide] PC shipments will continue to decline in at least mid-single digits," Boggs said.