Taiwan Semiconductor Manufacturing (TSM -0.23%) is far from the flashiest artificial intelligence (AI) name out there. It doesn't design chips like Nvidia, Advanced Micro Devices, and Broadcom, and, as such, it doesn't tend to get the same hype.
However, all these chipmakers hand their designs to TSMC for large-scale manufacturing, turning them into real products. That's why it's not only one of the best, but one of the safest ways to invest in the AI infrastructure buildout. It wins no matter which chip designer takes the lead, and it's generating a ton of cash doing it.
Even Nvidia's CEO Jensen Huang went out of his way to praise the company. He called TSMC "one of the greatest companies in the history of humanity," adding that "anybody who wants to buy TSMC stock is a very smart person." That is not the kind of praise Huang throws around lightly.

Image source: Getty Images.
TSMC has a foundry nobody can catch
TSMC is the top foundry in the world, producing most of the world's advanced chips. Rival Intel (INTC -0.22%) has been trying to build its own foundry business, but it is losing money and hasn't been able to gain any ground. In fact, the U.S. government recently made a large investment in the struggling company, reportedly to help bolster it.
Samsung, meanwhile, has struggled with production yields. It also recently lost one of its advanced chip designs, as Alphabet switched to TSMC for its Tensor G5 chip used in its Pixel smartphones. Neither Intel nor Samsung has shown that they can match the scale or reliability of TSMC.
That's why TSMC has locked in almost every large AI chipmaker as a customer. Chip designers are constantly looking to shrink node sizes, and TSMC is the only foundry that has shown it can consistently produce advanced nodes with strong yields. Nodes are a reference to the size of the transistors used on a chip, measured in nanometers. With smaller nodes, more transistors can be packed onto the chip, which improves performance and power efficiency.
Smaller nodes are becoming an increasingly larger part of TSMC's mix. Chips built on 7-nanometer or smaller nodes are already nearly three-quarters of TSMC's revenue, while its 3nm chips alone are almost one-quarter. Meanwhile, it is already preparing to move into 2nm.
TSMC is a cash flow machine
One of the most overlooked parts of TSMC's story is its cash generation. In 2024, it produced more than $26.5 billion in free cash flow. That was after spending heavily on building new fabs. So far this year, it's already generated over $15 billion in free cash flow despite continued heavy capex spending. It's also paying a growing dividend off that mountain of cash.
Most people think of foundries as low gross margin businesses; however, TSMC is changing that narrative. Its leadership in advanced nodes has given it strong pricing power over the years. Nobody else can deliver chips at the same density and yield, so customers are willing to pay up. That's why its margins have stayed strong and have been increasing.
TSMC is an under-the-radar stock
Investors don't talk about TSMC with the same excitement they talk about Nvidia or AMD. That could be because it's not a brand consumers recognize, or perhaps because the foundry business isn't just quite as exciting. It's also not a U.S.-based company, with its headquarters in Taiwan.
However, TSMC has been one of the biggest beneficiaries of the AI buildout, and it should continue to be a big winner moving forward. Last quarter, its revenue climbed 44% to $30 billion, while its profits soared. Meanwhile, management expects AI chip demand to grow more than 40% annually through 2028. The company is working closely with its largest customers to increase capacity, so it should have good visibility into this growth.
Overall, TSMC is one of the most important companies in the AI supply chain. Without it, the current AI infrastructure buildout wouldn't be possible. It's growing rapidly, expanding margins, and generating a boatload of cash.
Despite that, the stock is one of the most attractively valued AI plays in the market, trading at a forward price-to-earnings (P/E) ratio of 24.5 times based on analysts' 2025 estimates and a price/earnings-to-growth ratio (PEG) of less than 0.65. Stocks with PEG ratios below 1 are generally considered undervalued.
Investors would be smart to heed Jensen Huang's advice and be a buyer of TSMC.