Artificial intelligence is a growing industry worth investing in. One way to do so is to buy shares in businesses playing an essential role in the AI market. Two such companies are Applied Materials (AMAT -0.43%) and ASML (ASML -0.32%).

Both supply machines to manufacture the microchips that make AI possible. They are also two of the world's biggest providers of this semiconductor equipment.

ASML specializes in lithography machines. These apply the blueprint of a microchip onto a silicon wafer. Applied Materials is known for the tools used in other steps of the microchip manufacturing process, such as metrology and inspection systems to ensure chips are defect-free.

While both play crucial roles in the AI ecosystem, if you had to choose between them, which comes out on top as the superior AI stock? Let's dig into ASML and Applied Materials to find out.

The pros and cons of Applied Materials

Applied Materials management sees tremendous long-term business opportunities thanks to the secular trends involving semiconductor components. Many markets now rely on semiconductors, including electric vehicles (EVs), robotics, solar and other renewable energy, and, of course, artificial intelligence.

Applied Materials products are poised to remain in demand for years as the equipment evolves to meet increasingly complex needs. For example, semiconductor manufacturers are starting to adopt Gate-All-Around (GAA) manufacturing technology to construct microchip transistors.

The Fin Field-Effect Transistor architecture is widely used today, but GAA is the evolution of this approach. It's aimed at improving the performance, power efficiency, and density of transistors.

Applied Materials generated $2.5 billion in revenue from GAA in its 2024 fiscal year, ended October 27, and expects to double that in fiscal 2025. Overall, the company's sales grew 2% year over year in fiscal 2024 to $27.2 billion, the fifth consecutive year of revenue growth.

However, a Morgan Stanley analyst downgraded its stock in December, expecting weak demand to weigh on the company's 2025 revenue. One factor involves U.S. government restrictions on semiconductor-related sales to the China market.

China is one of the company's most important markets. But for now, Applied Materials expects fiscal Q1 sales to reach around $7.2 billion, an increase from the prior year's $6.7 billion.

A look at ASML

ASML is not only a major supplier of lithography equipment to the semiconductor industry, it's the only company in the world today to sell the most advanced lithography technology, called extreme ultraviolet (EUV) lithography.

EUV machines are the sole means of manufacturing the most advanced microchips, ones that can produce powerful yet energy-efficient AI. This gives ASML a competitive advantage. Even so, its stock price declined after announcing third quarter results on October 15.

The company's Q3 revenue was $7.5 billion, up 20% from 2023's $6.2 billion, which is excellent growth. However, ASML management delivered a disappointing outlook.

The firm expects to finish fiscal 2024 with 28 billion euros in revenue, a small increase over 2023's 27.6 billion euros. The macroeconomic factors weighing on Applied Materials is also impacting ASML.

Moreover, management estimates the current weak demand in the semiconductor industry, outside of AI, will extend into 2025 with CEO ​​Christophe Fouquet stating, "other market segments are taking longer to recover." This dour outlook contributed to ASML shares being down about 6% in 2024, through the week ending December 27.

But the company's near monopoly on lithography machines positions it to succeed over the long run once the semiconductor market rebounds from its current softness. After all, the semiconductor sector is a cyclical industry, so a downturn eventually is followed by an upswing.

In fact, ASML's sales to the China market are expected to be around 20% of total revenue in 2025, which is the company's historical trend. And over the long term, ASML predicts it will hit between 44 to 60 billion euros by 2030.

Choosing between ASML and Applied Materials

While current macroeconomic factors are a short-term headwind for Applied Materials and ASML, over the long run, both are poised to benefit from years of growth in demand from the AI, EV, and other industries reliant on semiconductors. Therefore, it's ideal to invest in both companies.

But if you had to choose one, which is the better AI investment? The tie-breaker comes down to stock valuation. To assess this, here's a look at their price-to-earnings (P/E) ratio, a widely-used metric that tells you how much investors are willing to pay for a dollar's worth of earnings. 

AMAT PE Ratio Chart

Data by YCharts.

The chart shows Applied Materials and ASML have seen a drop in their P/E ratio from earlier in the year. However, the former's trailing earnings multiple is considerably lower than ASML's at the time of this writing. This suggests Applied Materials shares are the better value.

Its stock valuation, combined with the long-term secular trends that can offset a potential decline in sales to China, make now a good time to pick up Applied Materials stock.