Microsoft (MSFT -1.96%) posted its second-quarter earnings report on Jan. 25, and the tech giant easily beat analysts' expectations.

Its revenue rose 20% year over year to $51.7 billion, topping estimates by $910 million. Its net income improved 21% to $18.8 billion, or $2.48 per share, surpassing expectations by $0.16.

Those headline numbers were impressive, but should investors still buy Microsoft's stock as rising interest rates pummel the tech sector? Let's examine Microsoft's growth rates, guidance, and valuations to find out.

Microsoft CEO Satya Nadella.

Image source: Microsoft.

It's still firing on all cylinders

Microsoft splits its sprawling business into three segments: productivity and business processes (31% of its Q2 revenue), intelligent cloud (35%), and more personal computing (34%). All three divisions continued their streak of double-digit revenue growth in Q2:

Revenue Growth (YOY)

FY 2021

Q1 2022

Q2 2022

Productivity and Business Processes

16%

22%

19%

Intelligent Cloud

24%

31%

26%

More Personal Computing

12%

12%

15%

Total

18%

22%

20%

Source: Microsoft. YOY = Year over year.

Within the productivity and business processes segment, Microsoft's Office Commercial revenues rose 14% year over year. Dynamics grew 29%, while LinkedIn's revenue increased 37%. The cloud-based components of Office and Dynamics both grew much faster than their on-premise counterparts.

In the intelligent cloud segment, its server products and cloud services revenue rose 29%. Its revenue from Azure, which ranks second in the cloud infrastructure market after Amazon (AMZN -1.35%) Web Services (AWS), and other cloud services rose 46% -- which only marked a slight deceleration from its 50% growth in Q1.

In the more personal computing segment, its Windows OEM revenue rose 25% year over year, its Windows Commercial revenue grew 13%, and its Xbox revenue increased 10%, even as the broader gaming market faced a post-lockdown slowdown and supply chain disruptions. Its search and news advertising revenue rose 32% after excluding traffic acquisition costs.

Microsoft expects its total revenue to rise 16% to 18% year over year in the third quarter. Analysts expect its revenue to grow 17% for the full year. It doesn't expect its pending acquisition of Activision Blizzard (ATVI), which will increase the size of its Xbox business, to close until fiscal 2023.

Its cloud business continues to grow

Microsoft's total cloud revenues, which include all cloud-oriented businesses across its three divisions, rose 32% year over year to $22.1 billion -- 43% of the company's top line. That only represented a slight slowdown from its 36% growth in cloud revenues in Q1.

Azure, the most closely watched component of its cloud business, claimed 21% of the global cloud infrastructure market in Q3 2021, according to Canalys. AWS accounted for 32% of the market. However, Azure's market share has gradually expanded over the past two years as AWS' share declined:

Market Share

Q3 2019

Q3 2020

Q3 2021

Azure

17%

19%

21%

AWS

33%

32%

32%

Source: Canalys.

That expansion strongly suggests that many companies -- especially retailers that don't want to support Amazon's most profitable business -- will likely continue to choose Azure over AWS.

Its operating margins are still healthy

Microsoft posted an operating margin of 43% in Q2 2022, which dipped from 44.7% in Q1 but still marked a significant expansion from 41.5% in the prior-year quarter.

That year-over-year expansion is impressive, considering that Microsoft has significantly increased its headcount and ramped up its investments in its cloud engineering, sales, customer deployment, gaming, and LinkedIn segments over the past year. It also expects its operating margins to rise "slightly" for the full year, while analysts expect its earnings per share to grow about 15%.

Those healthy margins enabled Microsoft to return $10.9 billion (more than 100% of its free cash flow) to its investors through buybacks and dividends in Q2 -- representing a 9% increase from the prior-year quarter.

But is Microsoft worth its premium valuation?

It's hard to find any flaws in Microsoft's latest earnings report. However, the stock still trades at 32 times forward earnings, which is arguably a high multiple for a company that is expected to generate mid-teens percentage earnings growth for the foreseeable future.

But in this tough market, I think Microsoft's growth justifies that slight premium. It generates stable revenue and earnings growth, it has plenty of cash to deploy on buybacks, dividends, and fresh investments, and its well-diversified business has weathered plenty of economic downturns before. Therefore, I strongly believe Microsoft is still worth buying -- even if you missed out on the stock's monstrous 360% gain over the past five years.