If you've paid even the slightest bit of attention to the tech world lately, you probably came across the topic of artificial intelligence (AI). It's harder to escape than a catchy pop song in the summer.

With AI mania has come an influx of investors wanting to capitalize on the booming industry. This has caused the stocks of many companies dealing with AI to skyrocket, and many are sitting near all-time highs.

Some of the most sought-after companies from this newfound enthusiasm have been Nvidia, Microsoft, and CrowdStrike, but there's an underrated tech giant that deserves more attention: Taiwan Semiconductor Manufacturing (TSM 1.27%). While the company's stock is up an impressive 65% this year, I still believe many investors are overlooking its long-term potential.

TSMC is the start of the AI pipeline

TSMC is the world's largest semiconductor foundry, with a 61% market share of the global semiconductor foundry market as of the end of 2023. Its foundry model means it creates semiconductors (chips) for customers' specific needs rather than for general sales.

To see TSMC's importance in the AI pipeline, let's work backward with a simplified chain of events. Large-scale AI models used for natural language processing (think OpenAI's ChatGPT, Netflix recommendations, and Amazon's Alexa) need massive amounts of data to be effective. This large amount of data must be stored and processed in data centers, which rely on high-performance AI chips and graphic processing units (GPUs) to function effectively.

Most of these high-performance AI chips and GPUs come from Nvidia, which is arguably the biggest winner of the AI boom so far. This is where TSMC comes into the picture. It manufactures the advanced chips that companies like Nvidia rely on to create and power their AI hardware. Some reports have TSMC accounting for around 90% of all AI chip manufacturing.

Without TSMC's chips, the AI pipeline would be severely weakened, especially at its current scale.

A revenue boost could be on the way for TSMC

Most of TSMC's revenue comes from two sources: smartphones (38% of revenue in the first quarter) and high-power computing (46% of revenue).

A recent slump in the global smartphone market directly affected TSMC's revenue and was one of the main causes of its drop in the first half of 2023. Although the company finished the year off strong, it still hasn't fully picked up the momentum it had prior to the decline.

TSM Revenue (Quarterly) Chart

TSM Revenue (Quarterly) data by YCharts

But no worries, because help is on the way. In its latest earnings call, TSMC's CEO said he sees AI-related revenue doubling this year to make up a "low-teens percentage" of its 2024 revenue. More encouraging, however, was his projection that AI-related revenue would increase at a 50% compound annual growth rate (CAGR) for the next five years and account for around 20% of its revenue.

Smartphones will continue to be huge for TSMC (Apple alone is a large chunk of its revenue), but AI chips could be a two-for-one for the chip manufacturer. Given the demand, TSMC has the upper hand and can use its market dominance to flex its pricing power. Being able to increase prices without adding on extra costs could improve its margins and free cash flow.

The stock isn't cheap by most standards

Although I believe TSMC is underrated as a company, the stock isn't cheap by most metrics. Its price-to-earnings (P/E) ratio is close to 32, noticeably above its average for the past five years.

TSM PE Ratio Chart

TSM PE Ratio data by YCharts

While TSMC's stock is more expensive than usual, its growth potential justifies premium. It's not just about AI and the critical role it plays in the growing ecosystem, either.

An expected rebound in the smartphone and PC markets should also give TSMC a financial boost going forward. Add in its above-average dividend, and investors have even more reason to hold on to the stock long term.