Nvidia remains the leader in AI model training and is well-positioned for inference and agentic AI.
Alphabet's TPUs have given it an edge in multiple areas.
Artificial intelligence (AI) infrastructure spending is booming, and two of the companies with leading chips in this field are Nvidia (NASDAQ: NVDA) with its graphics processing units (GPUs) and Alphabet (NASDAQ: GOOGL) (NASDAQ: GOOG) with its Tensor Processing Units (TPUs). The success of both is undeniable, as they are the two largest companies in the world by market cap as of this writing.
Let's examine both AI stocks to see which one looks like the better one to own over the next five years.
Will AI create the world's first trillionaire? Our team just released a report on the one little-known company, called an "Indispensable Monopoly" providing the critical technology Nvidia and Intel both need. Continue »
Image source: The Motley Fool.
Nvidia has been the biggest winner of the AI infrastructure boom thus far, and it remains incredibly well positioned for the future. The company has created a wide moat in AI model training through its CUDA software platform, as most early foundational AI code was written on its software and optimized for its chips. Given this, its dominant position in this market is unlikely to be seriously tested.
The growth it has seen as a result of this has just been staggering. For its first quarter of fiscal year 2027 (ended April 2026), Nvidia grew its revenue by a robust 85% to $81.6 billion. What is even more impressive is that its revenue has grown by more than 11 times in the past three years, from $7.2 billion in fiscal Q1 2024. While its GPUs have led the way with this growth, its data center networking business has actually been its fastest-growing product line, with revenue nearly tripling last quarter to $15 billion.
Nvidia hasn't been sitting still, and that is one of the big reasons why the company is so well positioned for the future. Seeing the rise of the market for inference, the company smartly "acquired" Groq, whose chips are nicely designed to handle the decode phase of inference. In addition, it has also designed its own Arm-based central processing units (CPUs) to help handle agentic AI. Together with its robust networking portfolio and CUDA ecosystem, it can now offer end-to-end server solutions to handle specific AI tasks, including training, inference, and agentic AI.
Nvidia is no longer just a GPU designer; it is now a complete AI infrastructure player.
Alphabet is obviously much more than a chipmaker; the company is best known for its Google search engine. However, it is its custom TPU AI accelerators that have given the company a big advantage in the AI race.
TPUs are ASICs (application-specific integrated circuits), which are hardwired chips designed to handle specific tasks. They cannot be reprogrammed like GPUs, but they can offer strong performance at a lower cost and tend to be more energy efficient. Alphabet developed its TPUs with the help of Broadcom more than a decade ago and has optimized its entire hardware and software stack around them.
Alphabet is benefiting from its TPUs in a few ways. The first is that they offer a significant cost advantage over competitors that rely on Nvidia's GPUs for both AI model training and inference. Second, it gives the company a cost edge in its cloud computing segment, where it can also offer customers not only Nvidia GPU-powered infrastructure but also cheaper TPU-powered offerings that carry higher margins. Finally, Alphabet has also let a few select customers, most notably Anthropic, purchase its TPUs directly from Broadcom for deployment within and outside Google Cloud, giving it a new high-margin revenue stream.
Whether Nvidia or Alphabet stock outperforms over the next five years could largely depend on how high AI infrastructure spending soars. While Nvidia is starting to see more legitimate competitors in areas like inference, I think it still takes a big share of the pie. Meanwhile, at a forward P/E of 16 times for fiscal 2028 (ending January 2028), the stock is relatively cheap.
However, Alphabet has an advantage with a complete AI stack, and if AI infrastructure overspending occurs, it can rent it to others or use it internally. Also, if AI infrastructure spending moderates, it is likely to be a winner because it has been one of the big spenders, and reducing capital expenditures (capex) will boost its free cash flow.
I like both stocks here, but I think Alphabet probably has a more durable model and could be a winner if AI capex moderates, giving it a slight edge.
Before you buy stock in Nvidia, consider this:
The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and Nvidia wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.
Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $440,440!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $1,303,950!*
Now, it’s worth noting Stock Advisor’s total average return is 959% — a market-crushing outperformance compared to 211% for the S&P 500. Don't miss the latest top 10 list, available with Stock Advisor, and join an investing community built by individual investors for individual investors.
See the 10 stocks »
*Stock Advisor returns as of June 16, 2026.
Geoffrey Seiler has positions in Alphabet and Broadcom. The Motley Fool has positions in and recommends Alphabet, Broadcom, and Nvidia. The Motley Fool recommends Arm Holdings. The Motley Fool has a disclosure policy.