Taiwan Semiconductor Manufacturing (NYSE:TSM) operates the world's most advanced chip foundries. It manufactures the industry's smallest and most power-efficient chips for chipmakers like Advanced Micro Devices (NASDAQ:AMD), Qualcomm (NASDAQ:QCOM), NVIDIA, and Apple (NASDAQ:AAPL).

As a linchpin of the global semiconductor industry, TSMC profits from the market's current insatiable appetite for new chips. Over the past five years, its stock price has more than quadrupled as faster wireless connections, the expansion of the data center and Internet of Things (IoT) markets, new 5G and AI applications, and more advanced electronic devices have all sparked feverish demand for new chips.

A silicon wafer.

Image source: Getty Images.

TSMC has clearly been a great long-term investment, but can it maintain its momentum over the next five years? Let's take a fresh look at its technological roadmap and near-term challenges to decide.

How far is TSMC ahead of the competition?

TSMC started mass producing 5nm chips, which contain the smallest microprocessors in the world, in the second quarter of 2020. Samsung, its closest competitor, crossed that sizing milestone shortly afterward, but its 5nm chips still aren't as dense as TSMC's 5nm chips.

Denser chips pack more transistors into a smaller space, so leading "fabless" chipmakers like AMD, NVIDIA, and Apple still prefer to outsource their highest-end chips to TSMC instead of Samsung.

But TSMC and Samsung both remain far ahead of Intel (NASDAQ:INTC), which struggled to make the mass-production leap from 10nm to 7nm chips. Intel originally planned to launch its first 7nm chips in late 2021, but they've been postponed to 2023 following a series of manufacturing mishaps.

What's TSMC's roadmap for the next five years?

Looking back at TSMC's historic roadmap from the past 34 years, we'll see why Intel and so many other foundries have struggled to manufacture smaller chips.

TSMC's historic roadmap.

Image source: TSMC.

Up until the end of the 20th century, each new node was much smaller than the previous one. But since then, it has become increasingly difficult and expensive to manufacture smaller and denser chips on a mass scale.

That's why many chipmakers gave up on becoming IDMs (integrated device manufacturers) like Intel, which designs and manufactures its own chips. Today, most IDMs -- like Texas Instruments and Skyworks Solutions -- manufacture larger chips instead of producing tiny high-end chips.

TSMC plans to start mass-producing 3nm chips in the second half of 2022. It expects these chips to provide 70% more logic density than its 5nm chips, as well as 15% more speed at the same power levels and a 30% power reduction at the same speeds.

Upcoming chips, including AMD's Zen 5 CPUs, Apple's new first-party processors, and Qualcomm's next-gen Snapdragons, will all be manufactured with TSMC's 3nm process. Even Intel, which recently doubled down on its domestic foundry plans, will outsource some of its chips to TSMC's 3nm supply lines. That's why TSMC's 3nm node has already been entirely booked through 2024.

To meet that demand and maintain its lead, TSMC plans to increase its capex from $17.2 billion in 2020 to roughly $30 billion this year, and collectively spend about $100 billion over the next three years. It's also already started developing 2nm chips, and mass production could kick off in 2026.

But what about the competition?

Based on these facts, the ongoing chip shortage and robust demand for new 5nm chips should support TSMC's sales growth through 2024. But TSMC should still keep an eye on the competition.

Samsung also plans to mass-produce 3nm chips in 2022, but it's expected to remain behind TSMC and Intel in terms of overall density. IC Insights expects Samsung's chipmaking capex to remain nearly flat year over year at $28.1 billion this year, so it doesn't seem intent on overtaking TSMC.

Intel remains an unpredictable contender since its foundry expansion plans could be supported by big subsidies in the U.S. and Europe. It's also reportedly interested in acquiring GlobalFoundries, AMD's former foundry partner, which would significantly accelerate those efforts.

Intel probably won't ever surpass TSMC in the "process race" to create smaller chips, but it could pick up third-party orders for lower-end chips at larger nodes. This could be a threat to TSMC, which still generated 59% of its revenue from older nodes (larger than 5nm and 7nm) last year.

So where will TSMC be in five years?

I believe TSMC will remain the world's top contract chipmaker over the next five years, despite its geopolitical threats and aggressive spending measures. I'm not sure if it can replicate its monstrous gains from the past five years through 2026, but the secular growth of the semiconductor market should propel its stock much higher and enable it to outperform the broader market.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.