Microsoft (MSFT  ) opened 3.5% higher at a fresh, all-time high following second-quarter results that were better than expected in terms of revenue, earnings, and guidance.

Cloud Division Stands Out

Azure, the company's cloud division, is the biggest source of growth and is a major contributor to the stock's performance over the past few years. Azure beat analyst estimates by posting 62% revenue growth. Many expected Azure's revenue growth to begin decelerating like Amazon's (AMZN  ) AWS and other major cloud operators.

This contract was initially awarded to Amazon but reversed following public criticism from President Trump. Amazon is challenging this reversal in court, and Microsoft acknowledged this risk in its conference call.

Azure won contracts with the Department of Defense for the Joint Enterprise Defense Infrastructure program which could be worth up to $10 billion over the next decade, beating out Amazon and Oracle (ORCL  ). Salesforce (CRM  ) also picked Azure to run its Marketing Cloud service.

Inside the Numbers

Net profit per share was $1.51 per share which was above analyst estimates of $1.32. Revenue in the second quarter was $36.91 billion which was above analysts' estimates of $35.68 billion and 14% above the second quarter the previous year.

While cloud computing is the fastest-growing, Microsoft's biggest segment remains Personal Computing which includes Windows, Bing, and Xbox. It had revenue of $13.2 billion above the $12.85 billion consensus estimate, and 1.6% above the previous year. The Intelligent Cloud Segment which includes Azure posted revenue of $11.87 billion above the $11.40 billion estimates and 27% above the previous year. It's likely that next year Intelligent Cloud overtakes Personal Computing.

Strong Stock

Microsoft has many parallels to Apple (AAPL  ) in that it's a mega-cap technology stock that continues to grow revenues while maintaining juicy margins. Thus, it's attractive to growth investors especially due to the continued growth and attractive margins in Azure and the Office 365 suite.

But, it also appeals to institutional and more value-oriented investors as they have an enduring competitive advantage, stable cash flows, and deploy cash to return money to shareholders via dividends and share buybacks. Both stocks have also followed a similar trajectory. Microsoft is up 75% since 2019, and it's up 8.7% since the beginning of the year.