Microsoft stock fell briefly, rebounded and later surged on guidance on Thursday after the company announced strong earnings for the fourth quarter of its 2018 fiscal year, which ended on June 30.
Here's how the company did:
Microsoft chief financial officer Amy Hood told analysts on Thursday's earnings call that the company expects $27.35 billion to $28.05 billion in revenue. According to Thomson Reuters, analysts had expected Microsoft to forecast $27.38 billion in revenue, below the midpoint of the guidance.
Microsoft stock shot up to more than 4 percent above the closing price of $104.40.
As a whole, Microsoft grew revenue by 17 percent, according to a statement.
In recent years CEO Satya Nadella has focused investor attention around the Commercial Cloud, a group of products including commercial tiers of the Office 365 productivity software, Dynamics 365 business software and the Azure public cloud. Commercial Cloud brought Microsoft $6.9 billion in revenue, up 53 percent. That's down sequentially from about 58 percent growth. In a Tuesday note, KeyBanc Capital Markets analysts led by Brent Bracelin had estimated that Commercial Cloud would grow by 46 percent.
Microsoft, as usual, did not disclose exact revenue from Azure, but did say that it rose by 89 percent. The KeyBanc analysts had estimated that Azure on its own would yield $2.05 billion of the Commercial Cloud revenue, with 80 percent year-over-year-growth, down sequentially from 93 percent growth in the previous quarter. Analysts at Raymond James and Stifel also predicted 80 percent growth for Azure in recent days, while Credit Suisse analysts were more optimistic, looking for 84 percent growth.
"The law of large numbers is kicking in," Evercore ISI analyst Kirk Materne told CNBC in an interview, referring to Azure's growth. "The base is getting bigger. It is growing faster than AWS did when it was at a similar size. This is probably a $9 billion business growing at more than 80 percent."
The gross margin of Microsoft's Intelligent Cloud business segment, which includes Azure alongside products like System Center and SQL Server, improved.
The margin improvement is primarily thanks to Azure, although it was "offset in part by increased Azure sales mix," Microsoft said.
Intelligent Cloud in total had $9.6 billion in revenue, growing 23 percent year over year. The FactSet analyst consensus for Intelligent Cloud revenue was $9.09 billion.
The More Personal Computing segment -- containing Windows, devices, gaming and search advertising -- is larger, and in the fiscal fourth quarter it generated $10.8 billion, up 17 percent and above the $10.41 billion consensus.
The Productivity and Business Processes business segment, which includes Dynamics, LinkedIn and Office, came in just above expectations, with $9.67 billion in revenue, rising 13 percent. The consensus slightly higher at $9.68 billion. LinkedIn on its own contributed $1.46 billion in revenue in the quarter, up 37 percent.
Microsoft's gaming revenue grew by 39 percent in the fiscal fourth quarter, at about $2.29 billion. Within gaming, Xbox software and services revenue rose by 36 percent, "mainly from third-party title strength," Microsoft said.
Revenue from commercial Office 365 subscriptions went up 38 percent as commercial seat growth slowed slightly to 29 percent. Microsoft said it had 31.4 million Office 365 consumer subscribers in the quarter, up sequentially from 30.6 million.
Search ad revenue growth was flat sequentially, but it was up year over year, at 12 percent.
Microsoft had a record $4.1 billion in quarterly capital expenditures. That number is up 24 percent year over year.
In the fiscal fourth quarter Microsoft announced the $7.5 billion acquisition of code hosting company GitHub, as well as an Office 365 redesign. And it faced criticism for its collaboration with U.S. Immigration and Customs Enforcement.
In Microsoft's full 2018 fiscal year, it had $306 million in restructuring expenses -- which were generally for sales and marketing changes made in the fourth quarter of the previous fiscal year -- and a $13.7 billion charge related to U.S. tax reform enacted months ago. These costs aren't included in Microsoft's GAAP fiscal year numbers.
Microsoft stock is up about 23 percent since the beginning of the year. The stock hit new all-time highs several times and crossed the $100 mark for the first time in the fiscal fourth quarter.
-- Josh Lipton contributed to this story.