Palantir (PLTR 0.76%) has been one of the biggest success stories in the AI investing realm, as its stock has risen around 2,600% since the AI arms race began in 2023. This has caused Palantir's market cap to swell to around $410 billion, ranking it among the 25 most valuable companies in the world.

However, there's another stock involved in the AI arms race that can pass Palantir in valuation by 2030. I'm a huge fan of ASML (ASML -1.26%) and its innovative technology that has become a requirement to manufacture high-end chips. Although ASML doesn't trail Palantir by that much (it's currently a $400 billion stock), I think it has the potential to be a far greater investment than Palantir over the foreseeable future.

Investor explaining a stock to two clients.

Image source: Getty Images.

ASML is the only company in the world that can make EUV machines

AMSL provides machines that are vital in the semiconductor manufacturing process to foundry companies like Taiwan Semiconductor Manufacturing and Intel. While it has a few products, the most advanced are its extreme ultraviolet (EUV) lithography machines. These machines are used to lay the microscopic electrical traces on a chip.

Currently, the most advanced microchips available have 3 nanometers (nm) between electrical traces, and 2nm variants are launching later this year. For reference, a human hair is around 50,000 to 100,000 nm wide, and a red blood cell is 7000 nm wide. DNA is 2.5 nm wide, so the spacing between these traces is truly incredible.

ASML is the only company in the world that has developed these machines, giving it a technological monopoly. Furthermore, with how advanced and specialized this technology is, there are no true competitors, as it would take years of research and billions of dollars to create an alternative. This gives ASML a moat around its proprietary tech. It's rare to find a company in such a competitive industry with a technological monopoly, and investing in businesses like this can be a genius move.

As demand for AI chips rises, so does the need for production capacity, causing clients to purchase more ASML machines. If you believe that we'll need more advanced chips in larger quantities, then ASML is a no-brainer investment. I think it can also provide investors with solid returns moving forward, even outperforming a rapidly growing AI stock like Palantir along the way.

Palantir's valuation holds back its future

At first glance, it may seem impossible for ASML to outperform Palantir. Palantir is growing quickly and has a much larger customer base than ASML.

PLTR Revenue (Quarterly YoY Growth) Chart

PLTR Revenue (Quarterly YoY Growth) data by YCharts

However, investors must also consider the price they're having to pay for that growth. Palantir's valuation has gotten extremely expensive and is to the point where it doesn't make a whole lot of sense.

PLTR PE Ratio (Forward) Chart

PLTR PE Ratio (Forward) data by YCharts

ASML's stock trades for a reasonable 37 times forward earnings and 12 times sales. Palantir is far more expensive, trading at an unbelievable 127 times sales and 269 times forward earnings. If Palantir were to grow its revenue at a 50% rate each year, achieve and sustain a 35% profit margin, and not increase its share count, the stock would trade at 27 times sales and 76 times 2030 earnings. So even after five years, Palantir's stock would still be more expensive than ASML's stock is today, even if ASML didn't grow over that five-year time frame.

However, ASML's management expects revenue to reach 44 billion to 60 billion euros by 2030, up from 32 billion over the past 12 months. This makes it highly likely that the market will correct itself regarding Palatinir's stock price while also continuing to send ASML's stock steadily up over a long time frame.

I think this makes ASML a far better investment than Palantir. Even though ASML doesn't have the flashy growth rate that Palantir does, it is a strong and steady investment option.