Shares of Nvidia (NVDA -3.00%) have shot up an impressive 121% in 2024, and there is a good chance that they will continue to rally higher following its latest results for the first quarter of fiscal 2025 (which ended on April 28, 2024) as the company's guidance clearly indicates that its red-hot growth is here to stay.

Nvidia is expecting its revenue to more than double on a year-over-year basis in the current quarter to $28 billion from the year-ago period's reading of $13.5 billion. Analysts are also expecting its bottom line to jump 134% year over year in the current quarter to $6.33 per share. The good part is that Nvidia's terrific earnings growth could continue thanks to its solid pricing power and market share in the booming artificial intelligence (AI) chip market.

However, certain investors may be wary about paying a rich 64 times earnings to buy Nvidia stock now even though it may be able to sustain its red-hot rally. Those investors can consider buying Microsoft (MSFT -1.32%). Shares of the software and cloud-computing giant are up only 10% so far this year and can be bought at 35 times earnings right now, which is a big discount to Nvidia's earnings multiple.

Let's look at the reasons why investors who have missed the Nvidia gravy train can buy Microsoft stock.

AI is accelerating Microsoft's growth

When Microsoft released its fiscal 2024 Q3 results (for the quarter ended March 31), the company reported a 17% year-over-year increase in revenue to $61.9 billion. Its earnings per share (EPS) increased by 20% to $2.94. For comparison, Microsoft's revenue was up 7% year over year in the same quarter last year, while its EPS increased by 10%.

AI is playing a central role driving this acceleration in Microsoft's growth thanks to the company's focus on integrating this technology across its product portfolio. For instance, Microsoft is offering AI-as-a-service through its cloud-computing infrastructure. The company's Azure OpenAI service has found a lot of takers as it allows customers to build AI applications without having to invest in expensive hardware.

Microsoft CEO Satya Nadella said on the company's April earnings-conference call that "more than 65% of the Fortune 500 now use Azure OpenAI service." Microsoft is offering a broad range of 53 large language models (LLMs) and small language models (SLMs) to its customers through the Azure cloud-computing platform. Not surprisingly, Microsoft said "the number of Azure AI customers continues to grow and average spend continues to increase."

This probably explains why Microsoft claims that the Azure cloud-computing platform is now gaining market share. The company's Azure revenue increased 31% year over year in the previous quarter, with seven percentage points of that growth coming from AI. For comparison, Amazon's cloud revenue was up 17% year over year in the quarter that ended in March, while Alphabet's Google Cloud revenue increased 28% year over year during the same quarter.

Amazon, Google, and Microsoft are the three biggest cloud-infrastructure providers. It is worth noting that Amazon's share of the cloud-computing market shrunk by one percentage point in the first quarter of 2024 as compared to the year-ago period, while Azure gained two percentage points. Google Cloud gained a single percentage point of market share during the same quarter.

The cloud AI market could generate annual revenue of $398 billion in 2030 as compared to $46 billion in 2022, according to Fortune Business Insights. Microsoft's cloud business, therefore, has a lot of room for growth thanks to AI. However, the good part is that this isn't the only way the company is capitalizing on the proliferation of AI.

The Windows business looks set to get a nice boost

Microsoft's AI opportunity isn't restricted to just the cloud. The advent of this technology is set to revolutionize the personal computer (PC) market as well. According to market research firm Canalys, a total of 150 million AI-capable PCs are expected to be shipped in 2024 and 2025. What's more, AI PC shipments are expected to log a compound annual growth rate (CAGR) of 44% through 2028.

The advent of AI-capable PCs should ideally give Microsoft's Windows business a nice boost as more users are likely to purchase the latest Windows 11 software to run AI features on their PCs. Around 71% of Windows users were using Windows 10 until September of last year, while Windows 11 was running only on 13.6% of Windows PCs.

Microsoft says that the functionality of AI features such as Copilot is limited on Windows 10 devices. As a result, the transition to Windows 11 should gain steam. The important thing to note here is that the adoption of Windows 11 seems to be gaining momentum as Microsoft's Windows revenue increased 11% year over year last quarter. That was a huge turnaround from the same period last year when Windows original equipment manufacturer (OEM) revenue was down 28% year over year.

In all, Microsoft is sitting on growth opportunities thanks to AI, and it won't be surprising to see the company's growth rate improving in the future. That's why investors who missed Nvidia's tremendous rally should consider buying Microsoft before it starts soaring and becomes expensive, as several factors suggest that it may well be on its way to becoming a top AI stock in the long run.