Artificial intelligence (AI) is sweeping across every industry. Researcher IDC forecasts that AI will contribute a total of nearly $20 trillion to the global economy over the next five years. By 2045, AI could drive enormous returns for investors who invest in the right stocks.
Here are two stocks that could deliver tremendous returns over the next 20 years.

Image source: Getty Images.
1. Nvidia
Nvidia's (NVDA 1.26%) dominance in the market for graphics processing units (GPU) -- vital hardware for handling AI workloads -- has placed it in a lucrative position. Even after its meteoric rise over the last few years, the chipmaker still has plenty of growth ahead.
Two years ago, on the company's fiscal Q4 2023 earnings call, CEO Jensen Huang stated, "I believe the number of AI infrastructures is going to grow all over the world." He expected to see more AI data centers built, and that Nvidia's chips, networking products, and software systems would help accelerate AI computing by a factor of 1 million times over the coming 10 years.
Nvidia's latest quarterly report shows that Huang's prediction is continuing to play out. In a quarter where its revenue grew 69% year-over-year, Nvidia saw accelerating deployments of AI-purposed data centers, aka AI factories. There are nearly 100 Nvidia-powered AI factories in progress right now -- twice as many as there were a year ago.
These specialized data centers are being built across every industry and geography. Nvidia is in a solid competitive position with its in-demand full-stack solutions that cover hardware, networking components, software, and systems. Its networking revenue alone jumped 64% over the previous quarter, reflecting a massive jump in demand for networking components to handle the massive growth in data processing and AI workloads that's happening now.
Industry estimates pointing to a $1 trillion data center opportunity could be underestimating the actual long-term opportunity for Nvidia. Nvidia has generated more than $148 billion in trailing 12-month revenue and its top line is still growing by more than 50% year over year. That trajectory for a company of this size indicates an enormous opportunity.
Nvidia is playing a vital role in meeting the demand for AI. While at some point there could be a slowdown in data center spending that saps Nvidia's momentum, the combination of its powerful GPUs and its popular networking and software solutions provides it with a wide competitive moat. The stock should continue to deliver long-term growth, as it has over the last quarter of a century.
2. Meta Platforms
Facebook and Instagram owner Meta Platforms (META 1.95%) could be a sleeper AI beneficiary over the long term. When AI ushers in time-saving services like fully autonomous robotaxis, people will have a lot more time to do other things, such as browsing social media. That's just one way AI could benefit Meta's business over the next 20 years that is not reflected in the stock's valuation.
Investors can get a hint of the impact that AI could have on Meta's business by looking at how much the company is investing in the technology. It is planning for capital expenditures of at least $64 billion in 2025, and those investments will go primarily toward data centers. (Investors should note that this rising spending on hardware is also ringing the cash register for Nvidia.)
Meta's high returns on capital show that it doesn't spend money like this unless management sees attractive returns down the road. The company is investing in AI for a number of initiatives, including new experiences to drive more useful and immersive experiences across its family of apps.
One of the ways it brings more useful content is by showing its users more relevant ads. Over the last few years, Meta has benefited from a growing digital ad market that has started to implement AI technology for improved ad targeting. Revenue grew 22% in 2024, and much of this momentum continued in Q1 2025, when revenue rose by 16% year over year.
Meta could also benefit from the launch of new devices powered by AI, such as its Meta AI glasses. More than 1 billion people wear glasses, and Meta believes that in the future, AI will be integrated into a large number of these glasses. So far, it seems to be tapping into a big opportunity, as sales of Meta's Ray-Ban AI glasses have tripled over the last year.
More than 3.4 billion people use Meta Platforms' apps every day. That's a huge built-in audience for it to leverage AI technology to grow the value of the business. Its current valuation of 27 times forward earnings estimates is a reasonable price, and leaves plenty of potential for the company's growth to drive healthy stock price gains over the long term.