Artificial intelligence (AI) stocks have become popular in recent months. The gains in some AI names have become eye-popping as investors and consumers become increasingly aware of the possible productivity gains these stocks can drive.

Nonetheless, long-term investors tend to seek stocks that will not rise and fall as trends come and go. Instead, they probably want to look to companies that operate sustainable businesses that could potentially drive AI-driven profits for decades. To this end, investors may want to consider positions in AI stocks such as Alphabet (GOOGL 10.22%) (GOOG 9.96%) and ASML (ASML 2.04%).

1. Alphabet

Google parent Alphabet has been an AI pioneer. Its use of AI goes back to 2001, when it applied machine learning (ML) technology to correct the spelling of those using Google Search. Its use of AI increased steadily from that point, and the company declared itself an "AI first" company in 2016, when it fully committed to incorporating AI into its products and services.

However, many observers began to doubt its AI prowess in 2023, when OpenAI released an upgraded version of ChatGPT. Given OpenAI's relationship with Microsoft, some investors feared that Google Search would face serious competition for the first time in years.

Nonetheless, that fear appears overblown. Alphabet has released a generative AI tool of its own called Gemini, which it bills as its most capable AI tool yet. Moreover, it stays ahead of the curve through Google DeepMind, its enterprise for developing general-purpose AI. Additionally, with liquidity of $111 billion, the company can afford to build or buy the technology it needs to stay competitive.

Furthermore, while advertising still made up 76% of company revenue in the fourth quarter of 2023, Google Cloud's growth now outpaces Google Advertising. That growth should accelerate AI development across the enterprise.

Whether the focus is advertising or other segments, Alphabet continues to grow at a respectable pace. Its $307 billion in revenue in 2023 grew 9% yearly. Also, since it kept a lid on cost and expense growth, the $74 billion in net income grew 23% over the same period.

Additionally, for all the talk about Alphabet falling behind, the stock rose by more than 35% over the last year. Also, since its P/E ratio of 25 gives it the lowest earnings multiple among the so-called "Magnificent Seven" stocks, now is likely an excellent time to add shares of the search giant.

2. ASML

ASML calls itself "the most important tech company you've never heard of." It is an equipment manufacturer that enables the production of the world's most advanced semiconductors through its extreme ultraviolet lithography (EUV) technology.

Its clients include chip industry heavyweights such as Samsung, Taiwan Semiconductor, and Intel, and the manufacturing capabilities of these companies are not possible without the type of equipment ASML provides. And thanks to ASML's technical lead, peers such as Lam Research and Applied Materials are less of an option for chip manufacturers.

Additionally, powerful tailwinds now drive the stock. With demand for AI chips on the rise, manufacturers need more ASML equipment. Also, companies are scrambling to manufacture less in Taiwan. With billions in government subsidies available to add capacity in the U.S., Europe, and Japan, ASML is one of the primary beneficiaries.

Furthermore, ASML prices its machines as high as $400 million per unit. Thus, clients will invest heavily in maintaining these machines. To this end, around 20% of net sales in 2023 came from service and field option sales. Such maintenance costs serve as a recurring source of revenue that can sustain ASML through slower sales periods.

Overall, net sales in 2023 reached almost 28 billion euros ($30 billion), 30% more than in 2022. While costs and expenses increased nearly as rapidly as revenue, net profits rose by 39% over the same period to 7.8 billion euros ($8.4 billion).

Nonetheless, it seems more investors are finally hearing of ASML. Over the last year, the semiconductor stock is up more than 35%, with nearly all of that gain occurring in 2024. Moreover, while its P/E ratio of 43 may seem elevated, it is close to historical averages.

Ultimately, that growth trend should bode well for ASML's shareholders. As the need for chips grows, manufacturers are likely to keep turning to ASML to maintain their development pipeline.