Earlier this year, Microsoft (MSFT 1.82%) dethroned Apple (AAPL -0.35%) to become the world's most valuable company. With a market capitalization of roughly $3 trillion, Microsoft is currently worth about $400 billion more than the iPhone manufacturer and stands atop the illustrious list of "Magnificent Seven" stocks.

Microsoft's push into the cloud transformed the company

Following Amazon's (AMZN 3.43%) lead, Microsoft began building its own cloud infrastructure business in 2008. In 2010, the company launched its Azure cloud platform. But Azure wasn't really in a state that would allow it to be a credible competitor to Amazon Web Services (AWS) until 2013.

A chart breaking down Microsoft's annual revenue by business segment.

Source: Statista.

Coinciding with the appointment of Satya Nadella as CEO in 2014, Microsoft reorganized and reclassified its business segments. The company also began placing a much bigger emphasis on cloud and subscription-based businesses. While this shift helped drive substantial sales and margin growth for its productivity-and-business-processes segment, the company's intelligent cloud segment and the Azure unit within that segment have been even bigger performance drivers.

As the chart shows, intelligent cloud revenue has grown at a rapid pace -- and the segment is now Microsoft's biggest overall sales driver. For the company's 2023 fiscal year (ended June 30, 2023), the segment generated sales of $87.9 billion and accounted for roughly 41.5% of the business's $211.9 billion in total sales. The division also accounted for roughly 43% of the $88.5 billion in operating income that Microsoft posted that fiscal year.

Strong performance for the Azure unit and overall intelligent cloud segment has continued in the current fiscal year and helped Microsoft become the world's most valuable company. While AWS remains the overall market leader in cloud infrastructure services, Azure continues to gain market share and it sees strong demand tailwinds in conjunction with the rise of artificial intelligence.

Even though Apple continues to generate more revenue than Microsoft, the more software-focused nature of Microsoft's business helps it have lower costs and achieve superior margins. Thanks to rapid growth and strong profits from the intelligent cloud segment, the software giant tops the list of the world's most valuable companies.