Shares of Microsoft (NASDAQ:MSFT) trade more than 4% higher in after-hours action following the report of a strong fourth-quarter earnings surprise.

Microsoft's GAAP earnings fell 4% year over year to $0.78 per share, crushing the $0.68 analyst target. Revenues rose 11% to $24.5 billion, also a positive surprise.

Sales of devices and consumer hardware, including products like the Xbox One console and Surface tablets, surged from $2.8 billion last year to $4.7 billion in the just-reported quarter, albeit at far weaker margins. The segment also reported 46% lower gross profits.

Microsoft also reports its online operations under this banner, but doesn't break these results out in detail. Search advertising revenue under the Bing banner did increase 34% year over year.

In the commercial division, a 10% sales surge rested on strong sales of the SQL Server database and a selection of cloud computing services.

"Our Commercial segment continues to outpace the overall market, and our Devices and Consumer segment had a great holiday quarter," said retiring CEO Steve Ballmer.

"These results reflect our focus on execution, cost discipline, and long-term shareholder value as we continue to drive the strategic transformation of the company," said CFO Amy Hood.