When investors are looking for stocks with massive upside potential, they usually aren't looking toward the world's largest companies to drive those returns. However, I think that's a mistake, because these companies are still reporting growth rates that would make their smaller counterparts envious.

Two trillion-dollar companies that I think investors should consider are Broadcom (AVGO 0.06%) and Taiwan Semiconductor (TSM 1.50%). Both companies are massive beneficiaries of the AI race. With spending projected to increase dramatically over the next five years, I think these two are genius investments to make right now.

Person looking at charts on laptop and clipboard.

Image source: Getty Images.

1. Broadcom

Broadcom is a competitor to Nvidia (NVDA -0.77%) in some aspects. While being an Nvidia competitor has worked out for almost nobody over the past few decades, Broadcom is approaching it differently. Broadcom isn't trying to duplicate Nvidia's market-leading graphics processing units (GPUs). Instead, it's partnering with AI hyperscalers to design custom AI accelerator chips.

Nvidia GPUs are unbeatable when workload flexibility is considered. But what if the chip is only going to run one type of workload throughout its service life? That's where a cheaper chip from Broadcom can actually outperform Nvidia's products.

This makes partnering with Broadcom an attractive option, and it's showing up in Broadcom's results. In third-quarter fiscal year 2025 (ended Aug. 3), Broadcom's AI revenue rose 63% year over year to $5.2 billion. Management expects a massive increase for the fourth quarter, with AI-related revenue rising to $6.2 billion. That's a fast-growing segment, but it's still outpaced by other divisions within Broadcom. Broadcom's total Q3 revenue was nearly $16 billion, so Broadcom's other business units are still far larger than its AI divisions.

However, continued rapid growth from its AI product line will quickly transform Broadcom into a dominant AI stock, and Broadcom could overtake Nvidia as the fastest-growing trillion-dollar company over the next few years. This makes Broadcom a no-brainer buy right now, even with its large size.

2. Taiwan Semiconductor

Broadcom and Nvidia are both fabless design companies. This means that they design the chip, but they outsource the production to a different facility. Taiwan Semiconductor (TSMC) is the world's leading chip production facility, and both Nvidia and Broadcom use its services.

TSMC has risen to the top with its combination of continuous innovation and best-in-class yields. Later this year, it will be launching its 2-nanometer (nm) chip node, which is an impressive technological leap over the already popular 3nm node. When configured at the same speed level, these chips will consume 25% to 30% less power than their predecessors, giving them the potential to save a ton of money on input costs over the life of the chip. Beyond its 2nm chip node, TSMC has other chip nodes in the pipeline that are expected to launch over the next few years.

While TSMC is pushing the boundaries of what's possible, it's still outperforming the competition in existing categories. There are only two other chip foundries that can produce the most advanced chips: Intel and Samsung. Intel is still looking for customers for its advanced chip technology, and Samsung's 3nm yields are reportedly much lower than TSMC's, driving costs up significantly. This makes TSMC a no-brainer buy in this industry, and it has the growth to back it up.

In the second quarter, TSMC's revenue rose 44% year over year in U.S. dollars. If the AI computing market continues to expand, this growth rate will persist for multiple years.

If it does, that makes TSMC a no-brainer buy at these levels. Any long-term investor who's bullish on the prospects of using more advanced chips and in increased quantities over the long term should be a TSMC investor.