Warren Buffett is widely hailed as the greatest value investor of all time. So when he and his team at Berkshire Hathaway add a new stock to their portfolio, it's worth looking under the hood and finding out more.

A look at Berkshire's holdings reveals a host of sensible, inexpensively valued bank and financial stocks along with a handful of consumer staples and energy names. While Buffett has long had a penchant for financials, he hasn't been particularly noted as a tech investor, aside from his investment in Apple, which has become Berkshire's top holding.

But Berkshire's 13F filing just came out for the third quarter and shows that Buffett and his team initiated a large position in one tech stock: Taiwan Semiconductor Manufacturing (TSM -4.86%). Let's take a look at why the Oracle of Omaha bought Taiwan Semiconductor, and if this is a good stock for investors to follow him into.

Artistic representation of a semiconductor.

Image source: Getty Images.

A big-time buy

The 13Fs form are required filings by investment managers with more than $100 million in assets. They have to be filed within 45 days after the close of each quarter, and they show the investment manager's positions at the end of the previous quarter. According to Berkshire Hathaway's new 13F, the firm bought 60,060,880 shares of Taiwan Semiconductor for a reported price of $68.56. The total investment amounts to a massive stake of about $4.11 billion.

With this large initial investment, Taiwan Semiconductor instantly becomes a top-10 holding for Berkshire Hathaway, illustrating Buffett and his team's high level of conviction in the investment. Most of Berkshire's other top-10 names like American Express and Coca-Cola are companies that Buffett has held for many years, making the size of this new investment stand out even more.

A high-quality business with a durable moat

Here's why Buffett's team has the conviction to go big on this investment. Taiwan Semiconductor manufactures and sells semiconductors globally. It is the world's largest contract chip manufacturer. TSMC is a crucial part of the semiconductor industry because it makes some of the world's smallest and most advanced chips, which gives it a significant moat and impressive gross margins of 55%. Its products serve a comprehensive range of attractive end-markets including mobile devices, high-performance computing, automotive, Internet of Things (IoT), and more.

Taiwan Semiconductor has benefited from the long-term trend of semiconductor companies going fabless, meaning that they design chips and Taiwan Semiconductors and other foundries manufacture these semiconductors for them. Apple is Taiwan Semiconductor's biggest customer, and other top semiconductor companies like Qualcomm and Advanced Micro Devices are also customers. 

The link to Apple, Buffett's top holding, is intriguing. Apple says that it will start buying chips from a factory in Arizona starting in 2024, and Taiwan Semiconductor is in the process of building a new factory in the Copper State that's set to come on line in 2024. The company is also building a second factory in Arizona to meet "strong customer demand."Buffett's investment in Taiwan Semiconductor could be an indication that he is endorsing Apple's strategy or doubling down on it. 

Short-term pain, long-term gain 

While Buffett has not traditionally been a tech investor, he is no stranger to the space, as Apple is Berkshire's largest holding. More than anything else, Buffett is a value investor, and Taiwan Semiconductor's stock is attractively valued. Shares are down about 50% from their 52-week high and down nearly 40% year to date, creating an attractive entry point for Berkshire. Semiconductor stocks in general have sold off as investors worry that the market is oversupplied with chips. For example, the VanEck Semiconductor ETF, which tracks the industry, is down about 30% year to date.

But Buffett likely sees the disconnect between the short-term challenges and the long-term opportunity for the space here. Over the long term, semiconductor demand will increase thanks to organic growth in demand from end-markets including automobiles, high-performance computing, artificial intelligence, and others as they continue to incorporate higher semiconductor content. Semiconductor giant Intel forecasts that global spending on semiconductors will reach $1 trillion annually by the end of this decade, up from about $600 billion in 2022, indicating that there is massive growth ahead in this sector.

After this sell-off, Taiwan Semiconductor shares trade at about 16 times earnings, and an even cheaper 12.5 times earnings on a forward basis. A price-to-earnings/growth (PEG) ratio of about 0.75 further illustrates that the stock looks undervalued. Shares also sport a dividend yield of 2.5%, which is likely another factor that attracted Buffett. 

Taiwan Semiconductor is a high-quality company with a durable moat -- not many other companies can set up shop and start making cutting-edge semiconductors for companies like Apple and Advanced Micro Devices. The company sits at the fulcrum of a globally important industry that will grow for many years to come. Despite this, the stock is trading at an attractive valuation of just 12 times forward earnings, based on short-term issues. This setup made Taiwan Semiconductor an attractive investment for Berkshire Hathaway, and these factors mean that it looks like a good long-term investment in which to join Buffett.