The demand for artificial intelligence (AI) products and services remains strong. Tech companies have reported earnings recently, and they still remain committed to investing heavily in AI, in an effort to grow their businesses and take advantage of next-gen technologies.

You might be tempted to invest in leading AI chipmaker Nvidia and other highly valued stocks to capitalize on these growth opportunities, but there may potentially be a better, more underrated option available. One stock that's been sliding over the past year but that is critical in AI chip development is ASML (ASML 3.39%). It may be one of the best buys out there right now.

Two people designing a computer chip.

Image source: Getty Images.

ASML's key role in chipmaking

Dutch-based ASML makes photolithography machines. They are integral in chipmaking because they are necessary to etch patterns on silicon wafers. The company doesn't have any direct competition for its extreme ultraviolet lithography machines, which are used in creating the most advanced chips. The sophisticated machines give the business a strong competitive moat, which can put ASML in a great position to benefit from strong and continued demand in the AI chip market.

In the company's most recent quarter, which ended on June 29, ASML reported net sales totaling 7.7 billion euros ($8.9 billion), which rose 23% year over year. Net income totaling 2.3 billion euros ($2.7 billion) increased by more than 45%.

For the full year, the company is projecting 15% revenue growth and for its gross profit margin to be around 52%. ASML CEO Christophe Fouquet, however, remains cautious about the following year. "Looking at 2026, we see that our AI customers' fundamentals remain strong. At the same time, we continue to see increasing uncertainty driven by macro-economic and geopolitical developments."

That uncertainty may be a reason why investors haven't been all that eager to buy the AI stock this year.

The stock is trading well below normal levels

Over the past 12 months, shares of ASML are down 15%. The stock has been underperforming the market this year and it's trading at a modest price-to-earnings multiple of just 25 -- that's right in line with the S&P 500 average. Investors, however, are often paying far higher multiples for big players in AI. Nvidia, for instance, trades at nearly 60 times earnings.

ASML PE Ratio Chart

ASML PE Ratio data by YCharts

Tariffs and global economic uncertainty may be the biggest factors that are weighing down ASML's stock of late. If the company were based in the U.S., I think its valuation would likely be far higher than it is right now. But that certainly isn't a reason to shy away from it.

According to the consensus analyst price target of nearly $924, the stock could have near-term upside of more than 33%. In the long run, it may rise even higher given the persistent demand for cutting-edge chips.

Is ASML a no-brainer buy right now?

ASML is a stock that looks like a fantastic buy, perhaps even a no-brainer investment at this point. Between its strong moat, fantastic margins, promising long-term growth, and relatively modest valuation, it checks all the important boxes that long-term investors might look for in a business.

Even if the short term is hazy due to macroeconomic conditions, strong demand for all things related to AI suggests that ASML is going to be busy for a long time. It's a stock that I could see going a whole lot higher given its terrific fundamentals, which is why I wouldn't hesitate to buy it for the long haul.