Microsoft has reported the biggest quarterly loss in its history due to a $7.5bn writedown associated to theacquisition of the Nokia Devices and Services (NDS) business.

The company posted a net loss of $3.2bn, or 40 cents a share, for the fourth quarter ending 30 June 2015.

The company’s revenue was $22bn in Q4, while gross margin and operating loss was $14.7bn and $2.1bn, respectively.

The results also include a restructuring charge of $780m, with the company stating that it will incur further charges for combined writedown costs of $8.4bn.

Devices and consumer revenue declined 13% to $8.7bn, while commercial revenue increased to $13.5bn.

Surface revenue increased 117% to $888m, driven by Surface Pro 3 and launch of the Surface 3. The company also saw growth in commercial cloud and Xbox revenues.

Windows OEM revenue declined 22% due to the decline in the PC market.

Microsoft chief executive officer Satya Nadella said: "Our approach to investing in areas where we have differentiation and opportunity is paying off with Surface, Xbox, Bing, Office 365, Azure and Dynamics CRM Online all growing by at least double-digits.

"And the upcoming release of Windows 10 will create new opportunities for Microsoft and our ecosystem."

Microsoft chief operating officer Kevin Turner said: "In our commercial business we continue to transform the product mix to annuity cloud solutions and now have 75,000 partners transacting in our cloud.

"We are also expanding the opportunity for more partners to sell Surface, and in the coming months will go from over 150 to more than 4,500 resellers globally."