ASML (ASML -1.03%) and Qualcomm (QCOM 1.41%) are both linchpins of the semiconductor sector. ASML's lithography machines, which etch circuit patterns onto silicon wafers, enable chipmakers to manufacture the world's most advanced semiconductors. Qualcomm produces mobile system on chips (SoCs) -- which bundle together CPUs, GPUs, and baseband modems -- for smartphones, cars, and other connected devices.

Both stocks hit their all-time highs in 2021 as the market's ravenous appetite for new chips drove a stampede of bulls into the semiconductor sector. But in 2022, ASML's stock declined 31% as Qualcomm's stock sank 40%.

An illustration of a semiconductor.

Image source: Getty Images.

Both companies lost their luster as they grappled with the post-pandemic slowdown in personal computer sales, sluggish demand for new smartphones, and macro headwinds for the enterprise sector. All that pressure indicated a new cyclical downturn in chip sales was starting, while rising interest rates exacerbated that pain by driving investors further away from growth stocks.

But should long-term investors take a contrarian view and buy either of these out-of-favor semiconductor stocks today?

ASML monopolizes a crucial chipmaking technology

ASML is the world's largest producer of lithography systems. It's also the only supplier of extreme ultraviolet (EUV) systems, which are currently used by TSMC, Samsung, and Intel to manufacture the world's smallest and densest chips.

ASML doesn't face any competitors in the EUV space because it took more than two decades to perfect its current systems, which cost about $200 million each and require multiple planes to ship. Its monopolization of that crucial technology gives it unmatched pricing power and the ability to continuously expand its gross margins. 

ASML's technology is considered so crucial to semiconductors that the Dutch government, under pressure from the Trump Administration, banned the company from shipping its EUV systems to China in 2019. However, ASML continues to sell its lower-end deep ultraviolet (DUV) systems -- which are used to create older and larger chips -- to Chinese chipmakers.

ASML's annual revenue rose at a compound annual growth rate (CAGR) of 22% between 2016 and 2021, even after it withstood the chip glut in 2019 and the pandemic in 2020, as its gross margin expanded from 44.8% to 52.7%.

Analysts expect ASML's revenue to rise 14% in 2022 and grow 19% in 2023. During its latest investor day last November, the company predicted it could generate 44 billion to 60 billion euros ($64 billion) in revenue in 2030 -- which implies its revenue will grow at a CAGR of 10% to 14% from 2022 to 2030 -- as its gross margin reaches 56% to 60% by the final year.

Qualcomm is trying to expand beyond smartphones

Qualcomm was once the largest maker of mobile SoCs in the world, but it lost its crown to the Taiwanese chipmaker MediaTek in 2020. Qualcomm remains firmly in control of the premium handset market with top-tier customers like Samsung, but it's lost large chunks of the low- to mid-range markets to MediaTek.

Qualcomm also generated more than 10% of its revenue through sales of its baseband modems to Apple (AAPL 1.27%) in fiscal 2022 (which ended last September). That's worrisome, because Apple plans to completely replace Qualcomm's modems with its own chips by 2025.

Qualcomm has been diversifying its portfolio with more automotive and Internet of Things (IoT) chips to offset those headwinds, but it still generated two-thirds of its revenue from the smartphone market in fiscal 2022. Therefore, its near-term growth is still tightly tethered to the lengthening upgrade cycles for smartphones.

Between fiscal 2017 and fiscal 2022, Qualcomm's annual revenue rose at a CAGR of 15%, even as it endured the same macro disruptions as ASML. Qualcomm's adjusted pre-tax margins also expanded from 32% to 38% as the rising margins of its chipmaking business offset the shrinking margins of its licensing business. However, analysts expect Qualcomm's revenue to rise at an anemic CAGR of 1% from fiscal 2022 to fiscal 2025 as the smartphone industry deals with a grueling cyclical slowdown.

Looking ahead, Qualcomm's future market share losses to MediaTek (and other smaller mobile chipmakers) and its decoupling from Apple will generate additional headwinds for its core business. The company will continue to expand its auto and IoT businesses, but it will likely generate much slower growth than ASML for the foreseeable future.

The valuations and verdict

ASML trades at 27 times forward earnings and pays a forward dividend yield of 1.2%. Qualcomm trades at just 11 times forward earnings and pays a forward yield of 2.7%.

Qualcomm might initially seem cheaper than ASML, but it deserves to trade at that discount because its near-term prospects are dimmer. Qualcomm has more direct competitors than ASML, its core market faces a cyclical slowdown, and it will need to cope with its loss of Apple's orders. It will also need to ramp up its spending to expand into the auto and IoT markets.

ASML also faces some unpredictable headwinds, including Huawei's development of EUV systems for the Chinese market and more potential restrictions on its DUV sales to China. But ASML's monopolization of the EUV market makes it a crucial cog of the global semiconductor market and a more resilient long-term investment than Qualcomm.