Nvidia (NVDA -1.77%) may not be the best-performing stock in the market or the S&P 500 these days -- that'd be Palantir -- but there's a strong case that it has been the most important. The spotlight has been on Nvidia because of the pivotal role it plays in the artificial intelligence (AI) pipeline.

This investor interest has catapulted Nvidia stock 290% higher in the past two years. Yet, despite its impressive run, there is still a long growth runway ahead of it. And over the next five years, there's one major reason I'm confident Nvidia stock will continue to soar: the continued rise in AI-related spending from the world's largest companies.

People standing in data center with laptops and tablets.

Image source: Getty Images.

Nvidia will be a direct beneficiary of increased AI spending

Data centers are crucial to the AI ecosystem because they allow companies to train, deploy, and run advanced AI models at scale. Without Nvidia's graphics processing units (GPUs) and other hardware, data centers wouldn't be able to perform at their current levels.

Nvidia understands this, and the company has set its sights on being an AI infrastructure company. Five years ago, the data center segment generated $3.0 billion of revenue, or 27% of the company's fiscal 2020 top line. In fiscal 2025, the data center made up 88% of the business with $115.2 billion of revenue. Nvidia will still have its hands in markets like gaming and the auto industry, but AI is clearly what's now moving the needle for this business.

During the latest earnings call, CEO Jensen Huang said that he expects a "$3 trillion to $4 trillion AI infrastructure opportunity" over the next five years. Of course, not all of this spending will go to Nvidia, but as the undisputed leader of AI chips, it stands to be a huge beneficiary of these massive investments.