For investors, artificial intelligence (AI) is the gift that keeps giving. Despite worries about the economy -- high interest rates, a sluggish job market, tariffs, high prices, and a government shutdown -- the stock market keeps rolling along, powered by AI stocks that have no intention of slowing down.
Where to invest $1,000 right now? Our analyst team just revealed what they believe are the 10 best stocks to buy right now, when you join Stock Advisor. See the stocks »
AI infrastructure spending is expected to hit $490 billion next year, and to jump as high as $2.9 trillion through 2029. With that level of spending, it's no wonder why investors are continuing to pile into AI stocks.
But who is going to be the biggest winner in all this spending, as tech companies are scrambling to get a piece of the pie? In my view, it's the two companies with the biggest competitive moats -- Taiwan Semiconductor Manufacturing (NYSE: TSM) and ASML (NASDAQ: ASML).
Image source: Taiwan Semiconductor Manufacturing Company.
Taiwan Semiconductor Manufacturing
There's a rush to make high-performing semiconductor chips. Among other uses, semiconductors power data centers that companies are using to manage AI-powered programs and large language models, plus developing new features. Nvidia, Advanced Micro Devices, Amazon, Apple, Qualcomm, Alphabet, and others are making these chips -- but they're all turning to Taiwan Semiconductor, or TSMC, to fabricate them.
"They are a world-class foundry and support customers of diverse needs. You can't overstate the magic that is TSMC," Nvidia CEO Jensen Huang gushed last month.
TSMC owns roughly 70% of the semiconductor foundry market, according to Statista. The company is in demand because it's one of the few that can make 3 nanometer (nm) chips, and it's working on mass producing 2nm chips this year. The smaller the transistor sizes, the more transistors TSMC can squeeze into a chip, making them exponentially more powerful. TSMC gets about 60% of its revenue from 3nm and 5nm chips.
Nvidia is the unquestioned leader in designing high-powered graphics processing units (GPUs) that are essential to top AI functions, but it will be under pressure in coming quarters as other top companies ramp up their own chipmaking efforts.
No matter who comes out on top in that fight, however, TSMC will be the fabricator of choice. That's why it's poised to be a big winner from the AI infrastructure boom.
ASML
Based in the Netherlands, ASML is the only company in the world making extreme ultraviolet (EUV) lithography machines, which are used to make small, advanced circuits on semiconductor chips. They work better than deep ultraviolet (DUV) machines because they reflect light using mirrors, rather than refracting it with lenses. That allows ASML's EUV machines to print smaller and finer -- and gives chipmakers the ability to make more powerful chips.
The company has a massive growth window in front of it. Revenues for 2024 were 28.3 billion euros ($32.85 billion), with gross margins of 51.3%, and management says it expects to have annual revenue between 44 billion euros and 60 billion euros ($51.08 billion to $69.65 billion) by 2030 and gross margins between 56% and 60%. If it achieves those numbers, ASML will have a compound annual growth rate (CAGR) of 13.2% at the top end.
For the third quarter of fiscal 2025, ASML posted revenue of 7.5 billion euros ($8.71 billion). And despite the expected dramatic drop in China net sales in 2026 because of export restrictions imposed by the Dutch government, the company expects to see positive global sales growth next year.
The bottom line
TSM data by YCharts
TSMC and ASML stocks are seemingly moving in tandem these days -- both are up 47% on the year, and both have a strong growth story.
AI companies are going to battle for the next several years to gain supremacy and market share as they seek to capitalize on the massive opportunity in artificial intelligence. But no matter which of these companies come out on top, they'll be turning TSMC to build the chips. And TSMC will need ASML's groundbreaking equipment to make that happen.
Both companies are perfectly situated to profit from the explosion in AI infrastructure spending, and that's why I see them as the true winners in the years to come.
Should you invest $1,000 in Taiwan Semiconductor Manufacturing right now?
Before you buy stock in Taiwan Semiconductor Manufacturing, 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 Taiwan Semiconductor Manufacturing 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 $590,357!* 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,141,748!*
Now, it’s worth noting Stock Advisor’s total average return is 1,033% — a market-crushing outperformance compared to 193% for the S&P 500. Don’t miss out on the latest top 10 list, available when you join Stock Advisor.
See the 10 stocks »
*Stock Advisor returns as of October 20, 2025
Patrick Sanders has positions in Nvidia. The Motley Fool has positions in and recommends ASML, Advanced Micro Devices, Alphabet, Amazon, Apple, Nvidia, Qualcomm, and Taiwan Semiconductor Manufacturing. The Motley Fool has a disclosure policy.