Microsoft has reported a 7% dip in quarterly profit, chiefly due to incorporating the struggling handset business of Nokia.
Its CFO said the company plans to take $1bn in costs out of the Finnish operation and stop losses by fiscal 2016 - which ends in June 2016 - following massive job cuts.
That cheered Wall Street, which was not expecting such decisive action.
"The expense guidance around Nokia was much better than feared," said Daniel Ives, an analyst at FBR Capital Markets.
"While there is still some heavy lifting ahead, it appears brighter days are on the horizon for Microsoft after a decade of pain and frustration."
Microsoft shares hit new 14-year highs over the past week, and were up 1.1% at $45.33 after hours.
Nokia, which Microsoft bought in April for $7.2bn in an attempt to take on Apple and Samsung directly in the fast-growing smartphone market, added almost $2bn to Microsoft's quarterly revenue, but posted an operating loss of $692m, which included some one-time costs.
Nokia's Lumia smartphones, while well-reviewed, have not been as successful as Microsoft hoped, capturing no more than 4% of the global market.
Lumia sales hit 5.8 million for the nine weeks of the quarter that Nokia was part of Microsoft. That compares with 35.2 million iPhone sales in the quarter.
Microsoft is in the process of drastically reducing Nokia's operation, closing some facilities and cutting about half of its 25,000 workforce, as it looks to rein in costs and refocus on cloud-computing under a plan launched by new Microsoft Chief Executive Satya Nadella last week.
"We will be relentless in our focus on our core, agile work and life experiences and the two platforms that support it, the cloud operating system and the device operating system and hardware," said Mr Nadella on the call with analysts.
A slight recovery in the personal computer market, which was essentially flat over the past three months after two years of declines, helped sales of Microsoft's core Windows and Office products in the quarter.
Overall quarterly revenue rose 17% to $23.38bn, above analysts' average estimate of $23bn, although the bulk of that was due to the addition of sales from Nokia.
Microsoft reported fiscal fourth-quarter profit of $4.61bn, or 55 cents per share, compared with $4.96bn, or 59 cents per share, in the year-ago quarter.
Wall Street had expected 60 cents per share, on average, although it is not clear how analysts had factored in the performance and cost of integrating the Nokia operation.