At the end of 2024, tech analyst Dan Ives predicted Nvidia (NVDA -1.14%), Microsoft (MSFT -0.64%), and Apple (AAPL 2.22%) would all reach a $4 trillion valuation in 2025. He expected Apple to hit the mark first, followed by Nvidia, and then Microsoft. But I think he got the order reversed: Microsoft will reach a $4 trillion valuation first.

Both Nvidia and Microsoft currently have market caps around $3.5 trillion, while Apple has seen its stock fall to about $3 trillion in market cap. The leading tech giants have received a clear boost from artificial intelligence (AI) spending, but Apple has struggled to make headway in advanced AI capabilities.

As a result, it looks like either Nvidia or Microsoft will reach the $4 trillion valuation threshold first. And despite strong operating results from Nvidia, Microsoft looks to have the edge.

Two men walking through a data center with glowing server racks.

Image source: Getty Images.

Can Nvidia's exponential growth continue?

Nvidia's strong results over the last few years were driven by unprecedented growth in its data center business. For the first quarter, data center revenue climbed 73% year over year.

The hyperscale customers like Microsoft are buying Nvidia's GPUs as fast as it can produce them. In fact, management says it remains supply-constrained, so revenue growth should stay robust throughout the rest of the year.

However, the company is heavily reliant on a handful of customers, including Microsoft. If those customers pull back on AI spending or shift to different chip suppliers, it could see a significant slowdown in revenue growth.

It faces plenty of challenges from other GPU makers and custom silicon solutions designed in partnership with the hyperscalers themselves. Several of them are working to build chips for both training and inference that offer better price performance than Nvidia's all-in-one solution.

So, while the GPU maker should continue to grow its top line extremely quickly, it comes with some significant risks that investors shouldn't ignore. The stock currently trades around 34 times earnings. That's not a completely unreasonable price to pay for a stock growing as fast as Nvidia is, and with such a dominant position in AI, but it does leave a lot of downside if it faces any setbacks in its operations.

Is Microsoft steadily marching toward $4 trillion?

Microsoft has seen strong results for its Azure cloud computing platform over the last few years, thanks, in part, to its partnership with OpenAI. The company invested an additional $10 billion in the generative AI leader at the start of 2023, boosting its cloud platform as well as its own enterprise software's AI capabilities.

The relationship between the two companies has become strained as Microsoft develops its own AI models, but it still looks to have cemented its position in the cloud.

To that end, the company is investing heavily to build out its data center capacity. It expects to finish out its fiscal year with $80 billion in capital expenditures, mostly related to building out AI data centers. Management continued to tell investors it's supply-constrained during its third-quarter earnings call.

Azure revenue growth is accelerating, up 33% in the most recent quarter. That's faster than its competitors, and a large portion of that is driven by demand for AI training and inference. As a result, Microsoft should see continued strong revenue growth for Azure, driving the entire business's performance.

The rest of the company benefits from AI as well. Its Microsoft 365 service integrates its Copilot software, and has increased both commercial and consumer customers at a double-digit rate.

The company's Copilot Studio makes it easy for enterprises to integrate their own data into an AI system to build their own specialized AI agents, further locking them into its enterprise software ecosystem and paving the way for growth.

Microsoft stock is priced on par with Nvidia's shares right now. But the former company's diversified business with both enterprise software and cloud computing stands on very solid footing, with those two areas showing strong growth and improving profitability. That makes it more attractive as a stock and more likely to reach the $4 trillion mark first.