Microsoft released its fourth fiscal quarter earnings after closing bell tonight, posting adjusted earnings of 62 cents per share on revenue of $22.18 billion. Analysts had been expecting the company to post non-GAAP earnings of 58 cents per share and revenue of $22.05 billion.

Microsoft Corporation Slips After Swinging To Net Loss

They had been gradually reducing their estimates for adjusted earnings, pushing them down from 63 cents per share four months ago. In the same quarter last year, Microsoft posted earnings of 55 cents per share and revenue of $23.38 billion.

Key metrics from Microsoft’s earnings report

Microsoft swung to a net loss of 40 cents per share as a result of the $7.6 billion write-down it took on the $8 billion acquisition of Nokia’s devices division last year. The software giant also took a restructuring charge of $780 million, which it previously warned would be between $750 million and $850 million due to job cuts in connection with the acquisition.

Additionally, Microsoft recorded a $160 million charge in connection with the restructuring plan that was previously set before the Nokia acquisition. In all, the charges had a negative impact of $1.02 per share. In last year’s fourth fiscal quarter, Microsoft posted net earnings of 55 cents per share.

Microsoft’s sales by segment

Commercial revenue was $13.5 billion, compared to the consensus estimate of $13.63 billion. The annual run rate for commercial cloud annualized revenue has surpassed $8 billion. Commercial Cloud revenue climbed 88% driven by Office 365, Dynammics CRM Online and Azure.

Also the Computing and Gaming Hardware division, which includes the Surface tablet and the Xbox, brought in almost $2 billion in revenue. Server Products and Services recorded a 4% increase in revenue, while Dynamics revenue increased 6%. Office Commercial products and services saw a 4% decline in revenue. Windows licensing revenue fell 8%.

Windows OEM revenue declined 22% due to the falling PC market, while Surface revenue increased 117% to $888 million driven by the Surface 3 and the Surface Pro 3. Xbox revenue increased 27% thanks to consoles, Xbox Live, and first-party games. Microsoft also recorded a 21% increase in search ad revenue with Bing’s share of the U.S. market rising 110 basis points to 20.3%.

As of this writing, shares of Microsoft were down 3.72% at $45.53 per share in after-hours trades.