Microsoft announced a net loss of $3.19 billion in the past quarter Tuesday, blaming a hefty writedown on the smartphone business it acquired from Nokia.
The US tech giant earlier this month announced a $7.5 billion charge to write down the value of the smartphone operations acquired last year from the Finnish group.
Microsoft also took restructuring charges of nearly a billion dollars as part of the move, which included some 7,800 job cuts worldwide.
Revenues dipped five percent from a year ago to $22.2 billion in the fourth fiscal quarter which ended June 30.
Sales from Windows, the core of the Microsoft business, fell 22 percent as the company ramped up for the release of the new Windows 10 operating system, aimed at both personal computers and mobile devices.
Windows Phone revenues tumbled 68 percent in a sign of the company's woes in the mobile sector, and the acquisition of Nokia's handset unit which meant lower royalties.
A bright spot for Microsoft was a 117 percent jump in revenues from its Surface computer, some $888 million for the quarter.
The company also saw growth in sales of its Xbox game consoles, and boosted revenues from its Bing search engine and its Office 365 software suite.
Chief executive Satya Nadella has been moving to establish subscription revenues for Microsoft products and to boost its cloud computing efforts with Windows lagging in mobile devices.
"Our approach to investing in areas where we have differentiation and opportunity is paying off," Nadella said.
"And the upcoming release of Windows 10 will create new opportunities for Microsoft and our ecosystem."