Artificial intelligence (AI) has helped Nvidia (NVDA -1.41%) become a $1 trillion company. It's become clear that the chipmaker is going to play a critical role in the growth of this technology with its powerful graphics cards, which are used to help train large AI models.

The surging demand for Nvidia's graphics cards explains why the company delivered terrific revenue guidance of $11 billion for the current quarter, which would translate into a 53% sequential jump. The year-over-year growth is going to be even more handsome at 64%. Such solid numbers sent shares of Nvidia up 190% in 2023, which explains why it is trading at a whopping 41 times sales and 220 times trailing earnings.

However, there is another chipmaker that's trading at an extremely attractive valuation and could join Nvidia in the $1 trillion club thanks to AI: Taiwan Semiconductor Manufacturing (TSM -1.30%), popularly known as TSMC. Let's see why that may be the case.

TSMC is a pick-and-shovel play on AI

It is no secret that companies have been lining up to buy Nvidia's data center graphics cards for their AI capabilities. As it turns out, the demand for the semiconductor bellwether's graphics cards is so strong that it is reportedly looking to place orders for more wafers from its supplier. That supplier is none other than TSMC, a semiconductor foundry company that manufactures chips for other companies.

TSMC is a third-party semiconductor foundry that makes chips for fabless semiconductor companies around the globe. Fabless semiconductor companies are those that design their chips but do not have a foundry to manufacture them. Instead, these fabless companies outsource their manufacturing to the likes of TSMC.

Nvidia is one such fabless semiconductor company that counts on TSMC for its chips. Reports suggest that TSMC added extra manufacturing capacity to increase the production of chip wafers so that it can supply them to Nvidia and help the latter meet the surging demand for data center GPUs. DigiTimes reports that TSMC will be making an additional 10,000 chip-on-wafer-on-substrates (CoWoS) for Nvidia over the rest of the year, increasing its monthly output by 1,000 to 2,000 substrates in the remaining months of 2023.

These 10,000 wafers will enable Nvidia to manufacture an additional 600,000 data center GPUs, indicating that TSMC is likely to play a key role in driving Nvidia's growth. At the same time, solid demand from Nvidia and other chipmakers, such as AMD, that are looking to enter the AI race, should pull TSMC out of its current slump.

The company's revenue in the first quarter of 2023 was down 5% year over year to $16.7 billion. TSMC's revenue was down in the first quarter on account of a slowdown in chip demand, triggered by weak macroeconomic conditions. The foundry giant's guidance for $15.6 billion in revenue in the second quarter, or 474 billion New Taiwan dollars (based on an exchange rate of 1 U.S. dollar to 30.4 NT dollars), would translate into a bigger year-over-year drop of 14%.

However, TSMC's monthly sales numbers suggest that it could deliver better-than-expected results. TSMC's revenue in the first two months of the second quarter stood at 324 billion NT dollars. It is worth noting that the company's revenue in May surged 19% month over month to 176 billion NT dollars, which can be attributed to the terrific demand for advanced chips from the likes of Nvidia.

A similar sales performance in June would enable TSMC to deliver stronger-than-expected growth and send the stock soaring when it releases its results later this month. Analysts are currently estimating a 7% decline in TSMC's revenue in 2023 to $70.6 billion, but there is a chance that it could do better thanks to AI-driven demand.

More importantly, TSMC's sales growth is expected to accelerate significantly in 2024 and beyond, as is evident in the following chart.

TSM Revenue Estimates for Next Fiscal Year Chart

TSM Revenue Estimates for Next Fiscal Year data by YCharts

TSMC should be able to sustain this impressive growth for a while considering the rapid growth that's expected in the AI chip market. Sales of AI chips are expected to jump from an estimated $22 billion in 2023 to $128 billion in 2028, which points toward a terrific growth pace.

As the world's largest semiconductor foundry with a market share of over 60%, TSMC is in pole position to take advantage of this rapid growth. The company also is set to ramp up the production of more advanced chips that could be lapped up by the likes of Nvidia and AMD.

A $1 trillion market cap seems like a possibility

We have already seen that TSMC is expected to post healthy revenue growth over the next couple of years, and it could sustain its momentum beyond that as the demand for AI chips grows. Analysts are anticipating 21% annual earnings growth from the company for the next five years.

The company is expected to deliver $5.15 per share in earnings this year. Applying the projected growth rate to TSMC's 2023 earnings estimate indicates that its EPS could jump to $13.35 per share at the end of 2028. Multiplying the projected earnings with TSMC's five-year average forward earnings multiple of 21 points toward a stock price of $280 after five years. That is close to three times TSMC's current stock price.

As TSMC currently boasts a $520 billion market cap, there is a strong likelihood that it could join Nvidia in the $1 trillion market cap club within the next five years. Given that TSMC is currently trading at just 20 times forward earnings -- substantially cheaper than Nvidia's forward earnings multiple of 55 -- investors are getting a good deal on this AI stock, which they may not want to miss given the potential long-term upside on offer.