The second-quarter earnings season is well underway. One of the first companies to report this period is Taiwan Semiconductor Manufacturing (TSM 2.71%), the largest semiconductor/computer chip manufacturer worldwide. TSMC hit the top end of its revenue guidance and generated phenomenal operating margins for the three months ending in June, causing shares to pop in the days following the release.

Investors have been worried about a downturn in semiconductor demand after the pandemic-induced boost to the industry. So far, these worries have not materialized. Taiwan Semiconductor's second-quarter results show strong demand for computer chips worldwide. But how long is that set to last? Let's see exactly what TSMC said in its second-quarter earnings report and conference call.

Solid Q2 results

On July 14, TSMC released its Q2 earnings results. Revenue was up 36.6% year over year to $18.16 billion, hitting the higher end of its previous guidance for $17.6 billion to $18.2 billion. Operating margin came in at 49.1%, significantly beating TSMC's guidance for 45%-47% margins. This occurred because of continued operating leverage from its factories and gains in the value of the U.S. dollar compared to the Taiwanese currency. With a lot of customers like Apple and Nvidia headquartered in the United States, a rising dollar means TSMC gets paid more for the same product output, all else equal.

TSMC continues to grow at such a significant pace for a few main reasons. First, its customers in the high-performance computing (HPC) industry are growing like crazy. These include artificial intelligence researchers, data centers for cloud providers like Amazon's Amazon Web Services, and edge computing networks. HPC revenue grew 14% quarter over quarter in Q2 and now makes up 43% of TSMC's overall revenue.

Second, TSMC continues to take its lead with the most advanced semiconductors. It is one of the few manufacturers in the world with the capacity to make 5-nanometer and 7-nanometer silicon wafers at scale (smaller equals better in the computer chip market), giving it a near monopoly with customers looking for the most advanced computer chips. Advanced nodes of the 5nm and 7nm variety now make up 51% of TSMC's overall revenue.

Over the next few years, TSMC plans to roll out its 3nm and 2nm manufacturing capabilities. This should further increase its competitive positioning versus companies like Samsung and Intel and strengthen its relationship with customers like Apple and Nvidia, who are looking to build some of the most advanced computer chips in the world. The only place they can do that is TSMC.

Potential short-term glut but long-term tailwind

The big worry many investors have with companies like TSMC is the history of cyclicality in the semiconductor market. Historically, as global demand increased for computer chips, companies would end up ordering too much inventory from manufacturers, causing a sharp reduction in demand, which led to a reduction in earnings for manufacturers.

With huge demand increases caused by the COVID-19 pandemic over the last few years, it is possible that TSMC's customers are ordering too much inventory right now, which will cause a slowdown in demand in 2023 or 2024. Management even warned about rising inventories on the Q2 conference call.

However, even if a one- or two-year glut materializes, that changes nothing for long-term shareholders in this business. On the Q2 call, management reiterated their confidence in growing TSMC's revenue by 15%-20% a year through 2026, combined with 53%+ gross margins. As long as you plan to hold shares for five-plus years, it shouldn't concern you if revenue growth slows down in 2023, especially when revenue is growing north of 35% annually right now.

Valuation is getting attractive

TSM Revenue (TTM) Chart

TSM Revenue (TTM) data by YCharts. TTM = trailing 12 months.

Even though shares popped last week, TSMC's stock is still down around 30% this year and now trades at a market cap of $430 billion. With $25.9 billion in trailing-12-month operating income, the stock trades at a price-to-operating income (P/OI) of 16.6. For a company with such a dominant market position, this is not expensive at all.

But what if we use TSMC's revenue forecast through 2026? If revenue grows at a 15% rate over the next four years, it will be at $107 billion in 2026. Conservatively, if we estimate that TSMC's operating margin will be 45% by that time, that would equate to $48.1 billion in annual operating income. That is a P/OI of 8.9 based on the stock's current market cap. In my book, this makes the stock an easy buy at these prices.