It's no surprise that some of the best investments over the past few years -- the ones that are leaving the S&P 500 (^GSPC -0.32%) in the dust -- are artificial intelligence (AI) stocks. AI stocks, including Palantir and Nvidia, have skyrocketed lately, pushing their share prices and valuations to astronomical heights.

But there's another monster AI stock that's crushing the market, and yet still flies below some investors' radars. I'm talking about Taiwan Semiconductor (TSM 3.31%), often referred to as TSMC, which makes the advanced processors that make AI possible.

TSMC's shares are up 180% over the past three years, compared to the S&P 500's 60% jump. This AI stock could continue climbing higher for three reasons.

A person looking at a computer.

Image source: Getty Images.

1. Its advanced processor manufacturing is unrivaled

Taiwan Semiconductor has been a dominant player in processor manufacturing for years and holds an estimated 90% of the advanced semiconductor manufacturing market. Whenever Meta Platforms, Microsoft, Nvidia, OpenAI, or other tech companies need AI processors, they are likely made by TSMC.

TSMC has maintained its lead by continually investing in cutting-edge manufacturing techniques that keep it ahead of competitors. The company has been producing chips at the 5nm node since 2020 and expanded into 3nm production in late 2022. It also began ramping up its next generation of 2nm chips this year, marking another major step forward in processor manufacturing.

2. TSMC's sales and earnings are on fire

There are many high-flying AI stocks out there these days, but not all of them have the same strong revenue and earnings growth as TSMC. In the first six months of 2025, the company's sales increased by about 40% to $55.6 billion. That comes on the heels of about 30% revenue growth in 2024.

TSMC is also very profitable. The company's earnings rose 67% to $2.47 per American depository receipt (ADR) in Q2, and TSMC boasts a gross profit margin of nearly 59% for the same quarter. This is especially notable at a time when some AI stocks are surging, but may not have the same profitability as Taiwan Semiconductor.

3. AI processor demand is strong

Some investors are understandably concerned that, at some point, some of the demand for AI processors will cool down once the tech giants have all the semiconductors they need. But that day hasn't come yet. Taiwan Semiconductor's management estimates that processor demand will be so high this year that the company will double its AI-related revenue in 2025.

What's more, the market for AI cloud-computing services, which relies on AI processors made by TSMC, will grow it to an estimated $2 trillion over the next five years. Microsoft, Amazon, and others don't want to be left out of this lucrative market and will likely continue their AI data center spending over the next several years so they don't fall behind competitors.

Is Taiwan Semiconductor stock a buy now?

Despite its massive gains in recent years, TSMC's shares still trade at a price-to-earnings ratio of just 25 -- roughly in line with the current S&P 500 average. With its shares priced fairly well right now, the company's sales and earnings growing quickly, and Taiwan Semiconductor commanding a dominant position in advanced semiconductor manufacturing, I think it's still a good time to buy shares.

Just keep in mind that the stock may not climb as quickly as it has over the past few years, given that the AI boom is already well underway.

For investors looking to diversify their exposure to artificial intelligence, AI exchange-traded funds (ETFs) are a good option, some of which include TSMC among their holdings.