The world has a desperate need for more semiconductors and computer chips. People and businesses are using more and more chips to power smartphones, computers, cloud data centers, and artificial intelligence (AI) research, among other things. With a growing amount of demand, analysts expect the industry to compound at a 6% to 7% rate through 2030, providing a steady tailwind for companies in the semiconductor supply chain.

Two leading semiconductor companies are Taiwan Semiconductor Manufacturing (TSM 0.86%) and Nvidia (NVDA 0.35%). The two businesses come at the semiconductor market from different angles, but both have benefited from rising demand for computer chips around the world, with their stocks outperforming the Nasdaq-100 index over the past five years. But which stock is a better buy today? Let's take a look. 

A close-up of a computer chip.

Image source: Getty Images.

Taiwan Semiconductor: The world's manufacturer

Taiwan Semiconductor -- or just TSMC -- is the world's largest semiconductor foundry. What does this mean? Unlike the older integrated manufacturers like Intel, TSMC does not design computer chips itself. Instead, it focuses solely on the manufacturing process for third-party customers like Apple, Advanced Micro Devices, and even Nvidia. Customers like this because it allows them to off-load the manufacturing expertise and capital expenditures to another company, which would otherwise have taken years to develop in-house. As a dedicated manufacturer with decades of expertise, TSMC is happy to take on these expenditures.

This dedicated model has given TSMC huge economies of scale and customer lock-in, allowing it to maintain a 50% market share of semiconductor manufacturing around the world. Unless there is a radical change among competitors or industry demand, the company should be able to ride overall demand and grow its business each year. In fact, management is guiding for an impressive 15% to 20% revenue growth through 2026.

In 2021, TSMC generated $56.8 billion in revenue with 41% operating margins. This translates to $23.3 billion in operating income. If TSMC can maintain its operating margin of 41% while also compounding revenue at 15% over the next five years, it will generate $46.8 billion in operating income in 2026. At its current market cap of $493 billion, the stock trades at a forward price-to-operating income (P/OI) ratio of 10.5 based on these 2026 estimates. This isn't dirt cheap, but given the durable tailwind of the semiconductor market and TSMC's dominant position, it seems like a pretty compelling opportunity.

Nvidia: Chips for the AI revolution

Nvidia, as I mentioned above, plays at the other end of the supply chain as a designer of semiconductor hardware and software. It revolutionized the market with its graphics processing unit (GPU), which was much better equipped for video game processing than a traditional central processing unit (CPU). It has grown alongside the video games market and now makes GPUs for AI researchers, cloud computing companies, and the automotive industry. Its chips are also used extensively for cryptocurrency mining.

In its fiscal year 2022 (which ended Jan. 30), Nvidia grew its revenue to $26.9 billion (a 61% jump) and achieved an operating income of $10 billion. The majority of Nvidia's business is coming from two segments: gaming and data centers. Gaming (which also includes crypto) grew fourth-quarter revenue by 37% year over year to $3.42 billion as the gaming and crypto markets continue to see strong demand. Data center revenue in the fourth quarter grew a whopping 71% year over year to $3.26 billion and is being driven by growth in demand from the technology giants. For example, Meta Platforms (formerly Facebook) is using Nvidia chips to build its new AI research computer.

At a market cap of $495 billion -- which is actually higher than TSMC's --  Nvidia trades at a trailing P/OI ratio of 49.5. If top-line growth continues at a double-digit rate, then this P/OI should come down rather quickly. But if not, we are looking at a premium valuation right now, even with the stock price down 34.3% so far this year.

So what is the better buy?

Both Nvidia and TSM are high-quality semiconductor businesses. But with TSM's diversified revenue, huge and defensible market position, and more discounted valuation, I think the Taiwan company is a better buy at these prices. That's not to say that Nvidia won't grow its business over the next five years, but just that TSM has a better risk versus reward profile at these prices.