Artificial intelligence (AI) is a growing industry worth your investment dollars. One way to invest in this sector is to buy shares in businesses playing an essential role in the AI market. Two such companies are Applied Materials (AMAT -0.62%) and ASML (ASML -0.44%). Both supply machines to manufacture the microchips that make AI possible and are two of the world's biggest providers of this semiconductor equipment.

ASML specializes in lithography machines, which 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.

Both play crucial roles in the AI ecosystem, but if you had to choose between them, which one is the superior AI stock?

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 AI.

The company's 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 Oct. 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 the company's 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 China.

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, but it's also 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 Oct. 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 company 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. CEO ​​Christophe Fouquet stated, "[O]ther market segments are taking longer to recover." This dour outlook contributed to ASML's shares being down about 6% in 2024.

However, the company's near monopoly in 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.

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. Over the long term, ASML predicts it will hit between 44 billion euros 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 I had to choose one, Applied Materials is the better AI investment. The tie-breaker comes down to stock valuation. To assess this, here's a look at each company's 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 that Applied Materials and ASML have seen a drop in their P/E ratios from earlier in the year. However, the former's P/E multiple is considerably lower than ASML's at the time of this writing. This suggests that 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.