After years of trailing Apple in the race to be the world's largest company (by market cap), Microsoft (MSFT -0.27%) has edged ahead of its longtime rival.

AAPL Market Cap Chart

AAPL Market Cap data by YCharts

And if its recent earnings report is any indication, Microsoft may not give up that lead anytime soon. Here's why.

Microsoft delivered another exceptional quarter

On Tuesday afternoon, Microsoft reported second-quarter financial results for the three months ending Dec. 31. Highlights included:

  • Total revenue of $62 billion, topping Wall Street's consensus expectations and up 18% year over year.
  • Adjusted earnings per share (EPS) of $2.93/share, also topping forecasts.
  • Microsoft's signature cloud business, Azure, grew revenue 30% year over year.
  • Net income rose to $21.9 billion, up 33% from a year earlier.
  • Xbox content and services revenue soared by 61% year over year (driven by the completion of Microsoft's acquisition of Activision Blizzard).
Sankey chart showing Microsoft's Q2 2024 FY revenue streams and costs.

In short, it was another fantastic quarter for Microsoft, which executed well on numerous fronts.

Let's start with artificial intelligence (AI), the hottest subject on Wall Street.

Microsoft CEO Satya Nadella got right to the point in his earnings commentary, noting, "We've moved from talking about AI to applying AI at scale...By infusing AI across every layer of our tech stack, we're winning new customers and helping drive new benefits and productivity gains across every sector."

In a nutshell, Microsoft is doing precisely what investors want: converting AI innovations into revenue. In other words, the company is monetizing AI.

What's more, key segments are still delivering massive growth despite their enormous size. The company's Intelligent Cloud segment reported $25.9 billion in revenue, up 20% year over year. Microsoft's More Personal Computing segment (which includes its Xbox unit) reported revenue of $16.9 billion, up 19% year over year, thanks, in part, to its acquisition of Call of Duty publisher Activision Blizzard.

Business success adds up to investor returns

Microsoft's execution means that shareholders are in for some rewards. The company has already returned $8.4 billion to shareholders in its most recent quarter alone -- $5.6 billion in the form of dividends, and $2.8 billion through its share repurchase program.

However, with $9.1 billion in free cash flow in just the fourth quarter and more than $140 billion in cash on hand, the company can increase shareholder returns if management so chooses.

Granted, Microsoft shares aren't cheap. They now trade at a price-to-earnings (P/E) multiple of almost 40x, making them almost twice as expensive as the average S&P 500 stock. Therefore, Microsoft may not be a great fit for every investor, or for every portfolio.

Nevertheless, thanks to its enormous size, incredible range of businesses, fantastic management, and the massive AI tailwind at its back, Microsoft still looks like an unstoppable juggernaut.