Microsoft Corp reported a $3.2 billion quarterly net loss, its biggest ever, as the company wrote down its Nokia phone business and demand fell for its Windows operating system.
The company took a charge of $7.5 billion in the fourth quarter related to the restructuring of its Nokia handset business, which it bought last year.
Microsoft's shares fell 4 per cent to $45.38 in extended trading on Tuesday.
Under Chief Executive Satya Nadella, the company has been shifting its focus to software and cloud services as demand for its once-popular Windows operating system slows. Sales of Windows to computer manufacturers to install on new PCs fell 22 per cent in the quarter.
The company is scheduled to roll out Windows 10 on July 29, a much-awaited launch after a lacklustre response to Windows 8.
Microsoft wants to generate revenue by building search and gaming into the Windows 10 interface, Chief Financial Officer Amy Hood said in April.
Bing, the company's online search engine, will be profitable in the year ending June 2016, Hood said on Tuesday.
Sales of Windows to businesses fell 21 per cent from the year-earlier quarter, when demand for the operating system had surged after Microsoft discontinued support for Windows XP.
Revenue from Microsoft's commercial cloud business, which includes offerings such as Office 365 and Azure, rose 96 per cent, excluding the impact of a strong dollar.
Microsoft said it added 3 million subscribers for Office 365 in the quarter, taking the total number of subscribers for the product to 15.2 million at the end of June.
The company said this month that it would cut 7,800 jobs, or nearly 7 per cent of its workforce, mainly in the phone hardware business.
Microsoft reported a net loss of 40 cents per share for the quarter ended June 30.
The company had posted net income of $4.61 billion, or 55 cents per share, a year earlier.
Microsoft also took a charge of $940 million related to job cuts announced this month and last year.
Excluding items, the company earned 62 cents per share. Revenue fell 5 per cent to $22.18 billion.