ASML (ASML -1.67%) and Taiwan Semiconductor (TSMC) (TSM -0.88%) play critical roles in the semiconductor industry. TSMC dominates the manufacturing process with a technical lead and a claim on nearly 60% of third-party chip production, according to TrendForce.

Still, TSMC's success is not possible without ASML, the leading manufacturer of the extreme ultraviolet lithography (EUV) machines that make advanced semiconductor production possible. Although both semiconductor stocks are likely to beat the market long term, one might have more potential for profit under current conditions.

Earnings growth

ASML has reported strong results in recent quarters. In the first quarter of 2023, net sales of 6.7 billion euros ($7.4 billion) rose 91% year over year on higher equipment sales. Net income almost reached 2 billion euros ($2.2 billion), well above the 695 million euros in the year-ago quarter.

A sales decline brought on by the pandemic in early 2022 makes much of the growth in Q1 an anomaly. Still, demand continues to increase, and the company predicts net sales growth of more than 25% in 2023. That exceeds the 14% net sales growth in 2022.

The effects of an industry slowdown were more evident at TSMC. Its $17 billion in revenue grew just 4% yearly, a dramatic drop from the 43% revenue increase in 2022. Growth slowed as client demand for chips decelerated, and since the cost of revenue and operating expenses grew faster than revenue, TSMC's net income of $6.8 billion increased by just 2%.

Additionally, TSMC forecasts revenue of between $15.2 billion and $16 billion in the second quarter, well under the $18 billion in revenue from Q2 2022. Despite that disappointment, the company also feels that the market bottom will occur in Q2, implying an improvement in future quarters.

Comparing the stocks

Considering the financial results, it likely surprises few that ASML's stock outperformed TSMC over the last year. Still, the results are not as dramatic as some might assume, with TSMC dropping 12% versus a 3% gain for ASML.

However, ASML more than doubled TSMC's performance over the last 10 years. Historically, the two stocks closely matched each other's performance until 2018. At that point, it became more apparent to investors that the chip industry was in for an unprecedented demand surge, sending both stocks higher.

Chart showing ASML's price change higher than TSMC's since 2018.

ASML data by YCharts

Consequently, ASML trades at a price-to-earnings (P/E) ratio of 35 versus just 13 for TSMC. While the faster stock price growth may explain part of the difference, another likely factor is geopolitics.

China has made increasingly aggressive threats against Taiwan in recent years. This gives some investors pause about TSMC, as most of its production takes place on the island. Additionally, Intel, Samsung, and even TSMC have moved to bring more manufacturing to other parts of the world, which probably means more demand for ASML's machines.

Moreover, the public learned on a CNBC interview that Warren Buffett's sale of TSMC in Berkshire Hathaway's portfolio was in fact Buffett's decision, and he made that call due to geopolitical fears. Conversely, TSMC bulls argue that China's dependence on its technology could prevent an invasion. Nonetheless, the saber-rattling seems to amount to a chilling effect on TSMC stock.

ASML or TSMC?

Given the financials and market conditions, investors should probably lean toward ASML. Admittedly, the massive difference in the P/E ratios makes this a close decision.

However, ASML has consistently delivered higher returns. Moreover, while TSMC's growth will probably recover, the boom in foundry production makes the threat of an invasion a tailwind for ASML, even if an attack never happens. Given ASML's comparative safety and faster growth, it will likely serve investors better than TSMC in the coming years.