With secular growth in various sectors, supply chain disruptions caused by the COVID-19 pandemic, and a burst of demand because of changing consumer habits, there was a perfect storm to cause a shortage of semiconductors over the past few years.

The industry sold a record 1.15 trillion units in 2021, driving total revenue to $556 billion. This makes the semiconductor market one of the largest and fastest-growing worldwide. But how can investors profit from this secular tailwind? 

Taiwan Semiconductor Manufacturing (TSM 2.71%) is the simplest way to invest in the global semiconductor shortage, setting shareholders up for solid returns over the long haul. Here's why. 

A computer chip on a circuit board.

Image source: Getty Images.

A pure-play manufacturer

Founded a few decades ago with government funding from Taiwan, TSMC brought a unique approach to semiconductor manufacturing. Instead of designing and building the chips itself like competitor Intel, it lets other companies design chips and focuses solely on the manufacturing process. This is called a semiconductor foundry.

Throughout the years, this focus on manufacturing excellence has allowed TSMC to leap ahead of the competition technologically, which is why it has won long-term contracts from industry giants like Apple, Nvidia, and Advanced Micro Devices. For example, when Apple started designing the chips for its own computing devices, it turned to TSMC because of its consistency and best-in-class abilities. It also helped that Apple could customize its chips specifically for its products, something you can't do with an off-the-shelf item from Intel.

A track record of growth and future market opportunity

TSMC's competitive advantage in semiconductor manufacturing has led to phenomenal growth over the past decades. Since 1994, the company's compound annual growth rate (CAGR) for both revenue and earnings is above 17%. Over the last 12 months, it has generated $59.9 billion in revenue and $25.3 billion in operating income. That is an operating margin of 42%, which is best in class for a manufacturing business.

But don't think the growth gravy train is set to stop anytime soon. Analysts expect industry revenues to grow to over $1 trillion by 2030, which would almost double 2021 sales. As the dominant manufacturer in the industry with plans to spend $40 billion to $44 billion on capital expenditures just this year, TSMC is setting itself up to capture a good slice of this revenue.

Accordingly, management has guided revenue to grow at a CAGR of 15% to 20% a year through 2026 while maintaining a 53% gross margin. If TSMC hits the low end of this guidance and grows revenue at a 15% CAGR from the end of 2021 through 2026, it will be doing approximately $115 billion in annual revenue by then.

Valuation is attractive, with one big risk

TSMC currently trades at a market cap of $476 billion. Assuming operating margins stay around 40%, the company should be generating $46 billion in operating income in 2026. Based on these numbers, the stock trades at a forward price-to-operating income (P/OI) ratio of 10.3, quite cheap compared to the market average. 

So what's holding up shares, and why haven't they priced in this growth? The majority of TSMC's factories are located in Taiwan. The island nation has a potential threat of invasion from China, which has talked in the past about reclaiming the territory. The odds of this actually happening are unclear, and TSMC is working to diversify its manufacturing assets outside of Taiwan, but it still poses a risk for shareholders if China decides to invade.

Even with the China risk, I still think TSMC stock is a great investment to play the growth in semiconductors. At a market cap below $500 billion, the stock seems like an attractive investment for the next decade and beyond.