Nvidia (NVDA -3.89%) is having one of the best years in its history. Its stock has surged 233% so far, propelling the company to a valuation of more than $1 trillion. Its recent success is driven by its data center chips designed for artificial intelligence (AI) workloads.

I think Nvidia could ride the AI trend to become the world's first $5 trillion company by 2030. However, it will have to beat other tech giants like Apple and Microsoft, which are much closer to the mark with valuations of $3 trillion and $2.8 trillion, respectively.

But Nvidia's recent growth rates suggest it could leapfrog both of them, even if the company endures a substantial slowdown. Investors who buy Nvidia stock today will enjoy a gain of 323% if it does cross the $5 trillion mark. Here's how it could get there.

Artificial intelligence could be the biggest tech opportunity in history

Wall Street analysts have issued wide-ranging estimates for the financial potential of AI, and they are staggering even at the low end. Goldman Sachs thinks the technology could add $7 trillion to the global economy by 2030. Cathie Wood's Ark Investment Management, on the other hand, puts that number at a whopping $200 trillion.

A substantial amount of that value will be created in centralized data centers, which are managed by tech giants like Amazon and Microsoft. They buy high-performance chips from providers like Nvidia, and rent that computing power to thousands of businesses around the world who use it to develop, train, and deploy their own AI applications.

Nvidia CEO Jensen Huang says there is $1 trillion worth of existing data center infrastructure that needs to be upgraded to support accelerated computing and AI, and some estimates suggest his company has a market share of 90% right now. That won't last forever with competitors like Advanced Micro Devices bursting onto the scene, but Nvidia has a significant head start.

Plus Nvidia has created an entire ecosystem around its chips, including the CUDA software platform which developers use as a foundation to build applications. That's why Nvidia's head start is so powerful; developers can't use CUDA with other chips, so by switching over to a competitor's hardware, they'd also have to move away from Nvidia's software ecosystem. That would create disruption, especially for large organizations.

A digital render of a circuit board with a chip in the center, inscribed with the letters AI.

Image source: Getty Images.

Nvidia just launched its new H200 data center chip

Nvidia's H100 graphics processing chip (GPU) has become the gold standard for AI data center infrastructure. It was designed to help developers rapidly train large language models (LLMs), which power popular consumer-facing generative AI applications like the ChatGPT online chatbot.

In fact, the H100 can speed up LLMs by 30 times over the previous generation in the inference phase, which involves feeding the model live data to make predictions.

But Nvidia just launched the new H200 AI data center GPU, which comes with twice the memory capacity of the H100. It means the H200 can double the inference speed of the H100, which leads to a major acceleration in LLM development. Plus, it consumes 50% less energy, so it's far cheaper to run for data center operators.

Nvidia's recent financial results are mind-boggling

Driven by demand for the H100, Nvidia's data center segment has been the primary source of the company's growth recently.

In the fiscal 2024 third quarter (ended Oct. 29), Nvidia saw its data center revenue hit a record high of $14.5 billion, representing a whopping 279% year-over-year growth rate. It drove the company's total Q3 revenue higher by 205% to $18.1 billion, which was far above Wall Street's forecast of $16 billion.

An infographic breaking down Nvidia's latest financial results for the fiscal 2024 third quarter.

Data source: Nvidia. Infographic by The Motley Fool.

Despite a recent U.S. government export ban on advanced semiconductors to countries like China, which have accounted for up to 25% of Nvidia's sales, the company still expects its revenue to soar to another record high of $20 billion in the upcoming fiscal 2024 fourth quarter.

Nvidia's surge in revenue is also driving a profitability explosion. The company's net income rose a staggering 1,259% year over year in Q3 to $9.2 billion. As the undisputed leader in data center GPUs -- which sell for as much as $40,000 each -- Nvidia has incredible pricing power, which allows it to operate with an extremely high profit margin.

Here's Nvidia's (mathematical) path to a $5 trillion valuation

Nvidia is currently valued at $1.2 trillion. Based on the company's trailing 12-month revenue of $44.8 billion, its stock trades at a price to sales (P/S) ratio of 26.3. That's relatively expensive compared to Microsoft, for example, which trades at a P/S ratio of just 12.9 (which is the second highest among the trillion-dollar tech giants, behind Nvidia).

But assuming Nvidia's P/S ratio of 26.3 remains constant between now and 2030, the company would have to generate $190 billion in annual revenue by then to justify a $5 trillion market capitalization. Nvidia is on track to deliver $58.8 billion in revenue during the current fiscal 2024 full year (ending Jan. 30, 2024), so that figure would have to grow at a compound annual rate of 21.6% to achieve $190 billion by 2030.

Nvidia has grown its revenue at a compound annual rate of 30% over the past 10 years, and Wall Street expects the company to grow far above that trend -- by a whopping 56% -- between fiscal 2024 and 2025. Therefore it looks like Nvidia could comfortably average 21.8% revenue growth between now and 2030.

However, if Nvidia's P/S shrinks and falls in line with Microsoft's, for example, Nvidia would need to deliver $388 billion in annual revenue by 2030 to justify a $5 trillion valuation. That would require compound annual growth of 36.9% between now and the end of the decade. It's a much greater hurdle for a company of this size, but given the estimated financial potential of AI going forward, it isn't outside the realm of possibility.

As I touched on earlier, Apple and Microsoft are well ahead of Nvidia in the race to $5 trillion. But Apple is only expected to grow its revenue by 3% this year, and Microsoft by 14%, so there is a case for Nvidia to maintain its premium P/S ratio for the years to come -- assuming the company continues to deliver above-trend growth.

For all the reasons discussed above, and most of all for Nvidia's presence in AI, I think this company has a real shot to leapfrog its multi trillion-dollar peers to become the world's most valuable company by 2030.