Microsoft (MSFT - Get Report)  shares traded at an all-time high Friday, lifting the world's most valuable company well past $1 trillion, after the tech giant posted stronger-than-expected fourth quarter earnings driven largely by its fast-expanding cloud computing business.

Microsoft said adjusted non-GAAP earnings for the three months ending in June, the company's fiscal fourth quarter, rose 21.2% from the same period last year to $1.37 per share, well ahead of the Street consensus forecast of $1.21 per share. Group revenues, Microsoft said, rose 12% to $33.717 billion and against best analysts' estimates of a $32.77 billion tally.

Looking into its 2020 fiscal year, Microsoft said it sees Intelligent, which includes its popular Azure offering, of between $10.3 billion and $10.5 billion for the three months ending in September, and double-digit operating income growth as well as stable operating margins for the broader Microsoft business over the whole of the year.

"Our Commercial Cloud business is the largest in the world, surpassing $38 billion in revenue for the year, with gross margin expanding to 63%," CEO Satya Nadella told investors on a conference call late Thursday. "I'm proud of what we have accomplished over the last 12 months, and I'm energized by the tremendous opportunity ahead."

"Every day, we work alongside our customers to help them build their own digital capability, creating new businesses with them, innovating with them, and earning their trust," he added. "This commitment to our customers' success is resulting in deeper partnerships, larger, multi-year cloud agreements and growing momentum across every layer of our differentiated technology stack, from application infrastructure, to data and AI, to business process, to productivity and collaboration."

Microsoft shares closed 0.15% higher Friday to end the session at $136.62 each after hitting an all-time high of $140.67 shortly after the opening bell. The closing gains extend the stock's year-to-date advance to 34.5% and value the Redmond, Washington-based group at around $1.05 trillion. 

Revenues from Microsoft's Intelligent Cloud division rose 21% on a constant currency basis to $11.4 billion, even as the growth rate of Azure slowed to 64%. Productivity and Pricing division revenues rose 17% to $11 billion, Microsoft said, while Personal Computing sales advanced by 6% to $11.3 billion.

Demand for next generation software remains strong. That is not good for legacy vendors who have earned poor Net Promoter Scores over years of taking advantage of customers they thought did not have alternatives," said Canaccord Genuity analyst Richard Davis, who boosted his price target to $155, while maintaining a buy rating on the stock, following the stronger-than-expected fourth quarter earnings.

"Microsoft under Nadella deserves credit for transforming itself from a firm difficult to partner with and rapacious in competition to one that is still a very tough competitor but also a company that will partner with other vendors if it makes its customers' work lives better."

How Much Do You Know About This Trillion Dollar Company?