Companies that benefit from the proliferation of artificial intelligence (AI) have soared big time over the past year or so, but their impressive gains mean that they aren't cheap anymore.

Nvidia (NASDAQ: NVDA) is a prime example of how an AI-fueled surge has elevated the valuations of semiconductor companies that are capitalizing on the adoption of this technology. The graphics-card specialist was trading at just under 13 times sales at the end of 2022, but its 233% gains in the past year mean that it is now trading at a much more expensive 33 times sales.

That reading is significantly higher than Nvidia's five-year average sales multiple of 20. However, the company with whose help Nvidia has dominated the AI chip market so far hasn't received much love from the market. Shares of Nvidia's foundry partner Taiwan Semiconductor Manufacturing (TSM 1.26%), popularly known as TSMC, are up just 25% in the past year.

The good part is that TSMC stock remains much cheaper than Nvidia. It is trading at 8.6 times sales and has a trailing earnings multiple of 22, which is much lower than Nvidia's price-to-sales ratio of 33 and earnings multiple of 78.

However, TSMC stock might not remain cheap for long, especially after its latest quarterly results that point toward a big turnaround in the company's fortunes in 2024.

Let's look at the reasons TSMC stock could follow in Nvidia's footsteps and start soaring.

AI is set to drive solid growth for TSMC

TSMC released its fourth-quarter 2023 results on Jan. 18. The company's full-year revenue fell almost 9% year over year to $69.3 billion, while earnings were down to $5.18 per share from $6.57 in 2022.

The year-over-year decline in TSMC's top and bottom lines can be attributed to the weakness in the smartphone, data center, and Internet of Things (IoT) markets last year.

But that is set to change in 2024. TSMC has guided for first-quarter revenue of $18.4 billion at the midpoint of its range, which would be a 10% increase over the prior-year period.

TSMC's first-quarter 2023 revenue was down almost 5% from the year-ago quarter. And management forecasts 2024 revenue to increase in the low- to mid-20% range, suggesting that a solid turnaround is ahead.

This potential jump in TSMC's 2024 revenue can be credited to the growing demand for its advanced 5-nanometer (nm) and 3nm chips. The company points out that 3nm chips accounted for 15% of its revenue in the fourth quarter, up from zero in the year-ago period. The 5nm chips, which are used by the likes of Nvidia to manufacture popular AI chips such as its H100 processor, accounted for 35% of its revenue as compared to 32% in the same period last year.

The demand for these advanced chip nodes should continue increasing in 2024 and beyond, thanks to customers such as Nvidia that are going to substantially increase the production of AI chips. Supply chain rumors indicate that Nvidia could triple the output of its H100 processors this year.

Meanwhile, the company's next-generation AI chips, code-named Blackwell, are reportedly going to be manufactured using TSMC's 3nm process in 2024 so that they can deliver even more computing power.

As it turns out, Nvidia is not the only one in line to purchase TSMC's 3nm chips. Along with Apple, which already uses the 3nm platform in its latest iPhone generation, the likes of AMD, MediaTek, and Qualcomm, are also expected to buy the 3nm chips. This is why TSMC is expected to increase the capacity utilization of the 3nm process to 80% in 2024.

Management predicted in December 2022 that its 3nm technology could help chipmakers create chips worth an estimated $1.5 trillion within five years since going into volume production. So investors can expect TSMC to keep growing quickly in 2024 and beyond.

As a result, analysts have substantially increased their growth expectations from TSMC.

TSM Revenue Estimates for Current Fiscal Year Chart

TSM revenue estimates for current fiscal year, data by YCharts.

Expect the stock to deliver impressive upside

The chart above suggests that TSMC could generate $112 billion in revenue in 2026. As mentioned above, it trades at 8 times sales, which is in line with its five-year average sales multiple. A similar multiple after a couple of years, along with $100 billion in annual revenue, would indicate a market cap of $896 billion, a jump of 51% from current levels.

But there is a good chance that it could trade at a much higher sales multiple considering that AI stocks such as Nvidia tend to command premium valuations. Assuming TSMC could command even half of Nvidia's price-to-sales ratio of 33, its market cap could jump to an impressive $1.85 trillion in a couple of years if it can achieve $100 billion in revenue. That suggests a potential upside of 212% from current levels.

So, the bottom line is that TSMC's stock could soar as AI drives stronger demand for its advanced chips, which is why investors should consider buying it before it becomes expensive.