Microsoft reported quarterly earnings and revenue on Thursday that handily beat analysts' expectations.
The company posted fiscal second-quarter adjusted earnings per share of 78 cents on $25.69 billion in revenue. Analysts had expected Microsoft to report earnings of about 71 cents per share on $25.26 billion in revenue, according to a consensus estimate from Thomson Reuters.
Shares in the computing giant jumping more than 8 percent in after-hours trading, but then gave back some of those gains.
"Businesses everywhere are using the Microsoft Cloud as their digital platform to drive their ambitious transformation agendas," Satya Nadella, Microsoft's CEO said in a statement. "Businesses are also piloting Windows 10, which will drive deployments beyond 200 million active devices."
The company said it returned $6.5 billion to shareholders in the form of share repurchases and dividends during its quarter ended in December 2015.
Microsoft's fiscal second-quarter earnings per share rose 11 percent from an adjusted 70 cents in the year-earlier period, and its adjusted revenue fell about 2 percent from the $26.14 billion it recorded for the previous period.
Investors are particularly enthusiastic about Microsoft's future business. The company reported deferred revenue, or sales that have been booked but not yet recorded, of $25 billion, topping the average analyst estimate of about $23 billion.
"It shows that momentum is building for Microsoft in 2016 rather than slowing, and that's different from what we're hearing from other enterprise tech companies," said Daniel Ives, an analyst at FBR Capital Markets who has a "buy" rating on the stock.
As with other recent quarters, investors are expected to key into Microsoft's cloud business, which many believe represents a crucial component for its future growth. The computing giant has been transitioning from a primarily PC-based company into a cloud-focused one, incorporating products such as Azure and Office 365 into its commercial and enterprise business.
Revenue in Microsoft's Intelligent Cloud business grew 5 percent (11 percent on a constant currency basis) to $6.34 billion. That slightly topped Wall Street's expectations for $6.29 billion, according to StreetAccount.
Within that category, Microsoft said its server products and cloud services revenue increased 10 percent in constant currency, and Azure revenue saw massive 140 percent constant-currency growth. More than one-third of all Fortune 500 companies chose Microsoft's Enterprise Mobility solutions, the company said.
"It's really about cloud at this point, it's the Rock of Gibraltar in terms of what Microsoft's seeing," Ives said. "Compare those to other tech dinosaurs — Oracle, HP — that they're competing against. ... They picked a right time to bet on cloud."
But PC sales will also capture attention, as those (long-slipping) sales continue to be a major part of Microsoft's revenue. Katherine Egbert, senior research analyst at Piper Jaffray, said in a Jan. 15 note that the weak PC sales number led her to trim her revenue forecast, citing a "faster-than-expected deceleration in global PC shipments" as a risk to the company.
Microsoft said its "More Personal Computing" revenue declined 5 percent (down 2 percent in constant currency) to $12.7 billion — primarily due to a fall in phone and Windows revenue. Wall Street had expected $12.29 billion for the business, according to data from StreetAccount.
On the Windows 10 front, Nadella said there are now more than 200 million monthly active devices — with the rate of adoption outpacing any of Microsoft's previous operating systems. The company has a goal of 1 billion active devices on the OS.
Revenue from Microsoft's Surface devices increased 29 percent in constant currency, the company said, citing the launch of its Surface Pro 4 and Surface Book. Phone revenue, however, declined 49 percent controlling for currency.
Amy Hood, Microsoft executive vice president and chief financial officer, said on the company's earnings call that the personal computing segment's outperformance was due in large part to better-than-expected device launches.
"It was a strong holiday season for Microsoft highlighted by Surface and Xbox," Kevin Turner, chief operating officer at Microsoft, said in the company's quarterly release. "Our commercial business executed well as our sales teams and partners helped customers realize the value of Microsoft's cloud technologies across Azure, Office 365 and CRM Online."
Xbox Live's monthly active users grew about 30 percent against the year-ago period to 48 million, and gaming revenue grew 9 percent in constant currency, the company said.
Looking ahead to the fiscal third quarter, Microsoft said it expects revenue of $6.4 billion to $6.6 billion in its Productivity and Business Processes segment (compared to Wall Street's expectation of $6.80 billion). For the Intelligent Cloud segment, the company is looking for revenue between $6.1 billion and $6.3 billion (compared to consensus $6.29 billion), and for More Personal Computing it expects $9.1 billion to $9.4 billion in revenue (compared to $9.32 billion).
The company expects about 4 points of total foreign exchange headwinds for its third quarter, Hood said.
Microsoft announced in February 2014 that Nadella would become its CEO. Since that time, Nadella has sought to reinvigorate the more than $400 billion market-cap company.
— CNBC's Josh Lipton, Ari Levy and Fred Imbert contributed to this report.