Microsoft posted quarterly earnings and revenue Tuesday that topped analysts' expectations, but took a hit from restructuring charges and soft demand for its legacy software products.
The technology giant reported earnings of 62 cents per share on $22.18 billion in revenue, but had a loss for the quarter once previously disclosed write-downs were included. Shares dropped nearly 3 percent in extended trading.
Analysts expected Microsoft to post quarterly earnings of 56 cents a share, including the charges, on $22.03 billion in revenue, according to a consensus estimate from Thomson Reuters.
A $7.5 billion cost related to its Nokia acquisition and other restructuring charges hit the company's results. Total impairment, integration and restructuring charges amounted to $8.4 billion in the company's fiscal fourth quarter, as it reported a $3.2 billion quarterly net loss including the write-downs.
Microsoft has shifted focus away from PCs and toward cloud services since Satya Nadella took the helm as CEO last year. Revenue for the company's commercial cloud computing—a crucial segment that includes Office 365 and Azure—grew 88 percent year over year, or 96 percent at constant currency. It has hit an annualized revenue run rate of more than $8 billion, the company 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," Nadella said in a statement.
The company said it added nearly 3 million subscribers to its Office 365 platform. More than 15 million people now subscribe to the service.
"Commercial cloud, commercial 365 business, all of this is what I think you're going to see in terms of better numbers or better outlook," Tim Seymour, managing partner at Triogem Asset Management, said in a CNBC "Closing Bell" interview Tuesday.
Sales of Microsoft's Windows and Office software, which historically accounted for the bulk of its business, continued to struggle amid a sagging personal computer market. Windows OEM revenue in the quarter dipped 22 percent. The company said sales were "impacted by PC market declines following the XP end-of-support refresh cycle."
Office products and services sales fell 4 percent from a year earlier, while Windows volume licensing slipped 8 percent.
"They're in this transition phase as a business right now," said Cole Wilcox, CEO of Longboard Asset Management, in a "Closing Bell" interview Tuesday.
But he added that Microsoft seems poised to make big advances in the cloud segment moving forward.
The company also highlighted bright spots in its hardware business like the Surface tablet segment, which saw revenue growth of 117 percent year over year boosted by the launch of the Surface 3. Xbox gaming sales jumped 27 percent.
Earlier this month, Microsoft said it planned to cut up to 7,800 positions, primarily in the phone business.
In a bold promotional move, the Redmond, Washington-based company in January said the forthcoming Windows 10 operating system would be free for qualifying users of Windows 7 and Windows 8. The platform will be released July 29.
In Microsoft's conference call, Nadella stressed that Microsoft 10's release could ease some of the pressure on the PC market.
Market research firm Gartner recently cut its forecast for 2015 PC and phone sales, saying the arrival of Windows 10 would slow rather than help a rebound in corporate PCs as businesses generally wait a while before upgrading to new platforms, Re/code reported earlier this month.
Gartner now sees the market growing just 1.5 percent this year, down from earlier projections for a 2.8 percent year-over-year increase.
—CNBC's Karma Allen contributed to this report.