Taiwan Semiconductor (TSM  ) rose higher following its Q4 earnings report which showed the company beating expectations on the top and bottom-line. Taiwan Semiconductor is the world's largest chip foundry, and it's benefitted from the extraordinary strength in the semiconductor industry due to high levels of demand stemming from the pandemic.

As a result, there have been persistent shortages which have resulted in soaring prices. Taiwan Semiconductor has also embarked on an aggressive capital investment program to increase capacity. Since Taiwan Semiconductor handles manufacturing for chipmakers like Apple (AAPL  ), Nvidia (NVDA  ), and AMD (AMD  ), its results are also considered a proxy for the broader tech industry.

Inside the Numbers

In Q4, TSM reported $1.15 per share, a 19% increase from last year's Q4. This also came in above expectations of $1.12 per share. Revenue also increased 24% to $15.74 billion which was slightly above expectations of $15.6 billion.

The company also issued guidance for Q1 that came in above expectations with revenue between $16.6 billion and $17.2 billion, while analysts were looking for $15.7 billion.

The company noted increased revenues from its major customers with particular strength driven by 5G networking chips and server demand due to cloud spending. In a statement, CFO Wendell Huang said, "Our fourth-quarter business was supported by strong demand for our industry-leading 5-nanometer technology. Moving into first quarter 2022, we expect our business to be supported by HPC (high-performance computing) related demand, continued recovery in the automotive segment, and a milder smartphone seasonality than in recent years."

TSM pioneered 5nm chips, which makes it the most advanced fab company, replacing Intel (INTC  ). In Q4, it accounted for 23% of total wafer revenue, while 7nm chips comprised 27% of wafer revenue. Smartphone sales made up 44% of its revenue with 37% coming from high-performance chips.

Many have been calling for a dip in semiconductor sales as the demand spike from the pandemic smooths out. So far, this hasn't happened as the chip cycle continues to last longer with no interruption. In fact, an increase in automotive production could result in another strong year of growth in 2022.

The company is planning to spend between $40 billion and $44 billion in 2022 to increase capacity and production amid the global chip shortage. Last year, it spent $30 billion.

Overall, TSM is a high-quality stock that benefits as long as the broader semiconductor industry is doing well. And, this seems likely given the ubiquitousness of chips in any type of product.

Currently, TSM offers a forward P/E of 25, 1.44% dividend yield, and 14% earnings growth with 36% profit margins. However, investors may want to wait for more weakness given the weakness in tech stocks that could also infect stalwarts like TSM.