Artificial intelligence (AI) is fast becoming the backbone of global business. According to PwC, AI is expected to contribute nearly $15.7 trillion to global GDP by 2030.

Not surprisingly, the technology giants driving this revolution are growing at breakneck speed and generating substantial profits. Considering the S&P 500 historically delivers approximately 10% annual returns, these two AI stocks are well positioned to outperform the broader market consistently by 2030.

A professional smiling while looking at a laptop.

Image source: Getty Images.

1. Nvidia

Nvidia (NVDA -1.10%) has become a poster child of the current AI revolution and is a crucial player in the AI infrastructure space. In its latest quarter (the second quarter of fiscal 2026, ending July 27), the company's revenues surged 56% year over year to $46.7 billion, with data centers accounting for nearly $41.1 billion of the total revenues.

Cloud service providers, consumer internet companies, and AI model builders, such as Meta Platforms, OpenAI, and Mistral AI, are increasingly utilizing higher-performance and energy-efficient Blackwell GB200 systems to train and run complex AI models in data centers. Many cloud service providers are also seamlessly transitioning to the next-generation Blackwell Ultra GB300 racks, as both systems share the same architecture, software, and physical footprint. The company is producing GB300 systems at a rate of 1,000 racks per week and expects this pace to accelerate with the addition of new capacity in the third quarter.

Nvidia's annual product cadence (releasing new chip architectures every year) proved to be a key competitive advantage. It helps in building a sticky customer base, as enterprises do not feel the need to switch out of Nvidia's ecosystem. The company made steady progress in price performance from Hopper to Blackwell and now plans to start volume production of the more advanced Rubin chips in 2026. To further push adoption, Nvidia partnered with OpenAI to invest $100 billion in deploying 10 gigawatts of AI infrastructure, powered by its Vera Rubin systems.

Nvidia also created a solid moat with its Compute Unified Device Architecture (CUDA) software stack, used to optimally program GPUs. Since 2006, CUDA has been used by almost 6 million developers across 200 countries to accelerate workflows and build GPU-based AI systems. Nvidia's networking business generated revenues of $7.3 billion in the second quarter, up 98% on a year-over-year basis. This highlights Nvidia's prowess well beyond GPUs into the full AI data center stack.

Management expects the global AI infrastructure opportunity to be worth $3 trillion to $4 trillion by 2030. The company is positioned to capture a significant share of this opportunity, with its relentless commitment to innovation and broad hardware-software ecosystem.

Nvidia is trading at 39.5 times forward earnings, which seems expensive. However, the premium is justified as Nvidia has made itself indispensable in the current AI economy. With exceptional pricing power, developer and customer lock in, and commitment to innovation, Nvidia can continue to outperform the S&P 500's historical annualized return handily till 2030.

2. Advanced Micro Devices

Advanced Micro Devices (AMD 23.61%) is also rising to prominence in the global AI infrastructure buildout, with growing strength in both CPU and GPU markets. In the second quarter of fiscal 2025 (ending June 28), revenues were up 32% year over year to $7.7 billion. Data Center revenues increased 14% to $3.2 billion, driven by strong demand for EPYC CPUs to power cloud and enterprise AI workloads.

Instinct GPU sales, however, were negatively affected by $800 million due to restrictions placed on exporting advanced processors, including MI308 GPUs, to China. Despite this headwind, the company generated free cash flow of around $1.2 billion in the second quarter.

Demand for general-purpose compute infrastructure is rising with the emergence of new AI use cases, as each GPU task triggers multiple CPU-intensive processes. Hyperscalers such as Alphabet's Google Cloud and Oracle's Oracle Cloud Infrastructure already deployed EPYC CPUs to power over 100 new cloud instances (virtual servers that run applications and workloads without requiring ownership of underlying hardware) in the second quarter. AMD now supports nearly 1,200 EPYC cloud instances worldwide. Enterprise adoption of EPYC CPUs is also accelerating, as original equipment manufacturers such as Hewlett Packard Enterprise, Dell Technologies, Super Micro Computer, and Lenovo Group have launched 28 server systems powered by fifth-generation EPYC "Turin" processors.

AMD is also seeing improved adoption of its MI300 and MI325 Instinct accelerators across Tier 1 customers, including cloud providers and AI companies. Seven of the top 10 AI model builders are now using AMD's Instinct accelerators. The company claims that its recently launched Instinct MI350 accelerators demonstrate matching or higher performance compared to GB200 in critical training and inference workloads, at significantly lower costs. Oracle has already opted for MI355 accelerators in its 27,000-plus node AI cluster. OpenAI also signed a deal with AMD to deploy 6 gigawatts of AMD GPUs over several ChatGPU generations.

These tailwinds highlight growing confidence among enterprises in AMD's GPU offerings. Hence, a better price-performance edge can help AMD carve out a significant share in the growing AI hardware market.

AMD advanced its software ecosystem with the launch of the open-source ROCm 7 stack. ROCm 7 demonstrated 3 times higher performance in training and inference compared to its prior generation. The company is also gearing up for the launch of the MI400 series and the Helios full-stack AI system (powered by MI400) in 2026. This could further advance the company's share in large-scale AI deployments.

AMD currently trades at about 42 times forward earnings, which is expensive. But high-quality companies do not come cheap. Wall Street is paying the premium for the company's solid growth prospects in both CPU and GPU businesses. While the company lags Nvidia, it remains the most crucial alternative in the AI infrastructure market.