2 Artificial Intelligence Stocks to Buy in May

Source Motley_fool

The AI industry is staring down an uncertain and volatile macroeconomic environment, as well as some signals that demand for AI infrastructure may be starting to cool. AI server manufacturer Super Micro Computer slashed its guidance earlier this week as customers delayed purchasing decisions, and some tech giants reportedly have been pulling back on data center expansion.

But investors remain keen on investing in artificial intelligence (AI). What are the best AI stocks to buy in May? Personally, I'd steer clear of AI hardware companies like Super Micro and Nvidia, as well as hyperscalers like Microsoft that are pouring incredible amounts of capital into AI data centers to power the latest compute-hungry AI models. Instead, I'd focus on companies that are betting on AI inference and small, efficient, specialized AI models and agents. My top two picks this month are International Business Machines (NYSE: IBM) and Cloudflare (NYSE: NET).

Where to invest $1,000 right now? Our analyst team just revealed what they believe are the 10 best stocks to buy right now. Learn More »

Winning in enterprise AI

There are multiple components to IBM's AI strategy, and all of them focus on real-world use cases for enterprise clients. The company has booked $6 billion in generative-AI-related business so far, adding $1 billion to that total in the first quarter, and much of that comes from the consulting business. While clients are being cautious with discretionary spending, generative AI projects are still getting the green light.

The consulting business feeds into the software business, where IBM's Watsonx AI platform headlines the company's AI efforts. Watsonx enables enterprise clients to build, test, deploy, and manage AI models and agents. The focus here is on small, fine-tuned models aimed at doing specific tasks well. IBM claims that enterprises can reduce costs by as much as 98.5% by switching away from expensive, general-purpose AI models.

Artist's rendering of a digital human face, lit up in the cosmos.

Image source: Getty Images.

Lastly, there's IBM's mainframe business. While the mainframe isn't as prolific as it once was, some industries continue to depend on the ultra-powerful systems due to their reliability and backward compatibility with decades-old code. The upcoming z17 mainframe, set to launch in June, can churn through 450 billion AI inferencing operations per day with latency of around 1 millisecond. This makes the system ideal for real-time AI inferencing tasks like detecting credit card fraud.

Taken altogether, IBM has built a broad portfolio of enterprise AI services, software, and hardware. While the company isn't immune to an economic slowdown, AI projects meant to reduce costs or boost efficiency should continue to be in demand from IBM's enterprise clients.

Fast AI inference at the edge

Cloudflare is all about speed. A developer can stick Cloudflare's platform between a user and a web application, performing ultra-fast computations on the fly when a user makes a request. There are many use cases that are covered by Cloudflare's platform, including handling redirects, enforcing authentication, and returning different responses based on the user's location. Another use case is running AI inference tasks using small, efficient, fast models without needing to worry about managing infrastructure or scaling resources.

Cloudflare's AI platform supports more than 50 open-source AI models, including models capable of generating text, classifying images, translating text, converting text into speech, and summarizing content. These models integrate tightly with Cloudflare Workers, the company's serverless computing product, allowing them to be programmatically accessed in response to user requests.

Because Cloudflare focuses on AI inference and running smaller AI models, the company doesn't need the absolute fastest AI accelerators that are typically used for computationally intensive AI training workloads. Instead, the company has some leeway to install older, less expensive AI accelerators while still achieving the necessary performance and latency for AI requests. This takes Cloudflare out of the scramble to secure the latest and greatest GPUs from Nvidia and likely reduces costs considerably.

Cloudflare's revenue grew by 27% year over year in the fourth quarter of 2024, and it gained a record number of large customers spending at least $1 million annually on the platform. With nearly 240,000 paying customers, Cloudflare's AI products are an easy choice for customers looking to deploy AI inference workloads.

Should you invest $1,000 in International Business Machines right now?

Before you buy stock in International Business Machines, consider this:

The Motley Fool Stock Advisor analyst team just identified what they believe are the 10 best stocks for investors to buy now… and International Business Machines wasn’t one of them. The 10 stocks that made the cut could produce monster returns in the coming years.

Consider when Netflix made this list on December 17, 2004... if you invested $1,000 at the time of our recommendation, you’d have $610,327!* Or when Nvidia made this list on April 15, 2005... if you invested $1,000 at the time of our recommendation, you’d have $667,581!*

Now, it’s worth noting Stock Advisor’s total average return is 882% — a market-crushing outperformance compared to 161% for the S&P 500. Don’t miss out on the latest top 10 list, available when you join Stock Advisor.

See the 10 stocks »

*Stock Advisor returns as of April 28, 2025

Timothy Green has positions in International Business Machines. The Motley Fool has positions in and recommends Cloudflare, International Business Machines, Microsoft, and Nvidia. The Motley Fool recommends the following options: long January 2026 $395 calls on Microsoft and short January 2026 $405 calls on Microsoft. The Motley Fool has a disclosure policy.

Disclaimer: For information purposes only. Past performance is not indicative of future results.
placeholder
XRP Price Keeps Bullish Tone – Bulls Eye Higher LevelsXRP price started a fresh increase above the $2.250 zone. The price is now consolidating near the $2.30 zone and might aim for a fresh increase. XRP price started a fresh increase above the $2.280
Author  NewsBTC
4 Month 29 Day Tue
XRP price started a fresh increase above the $2.250 zone. The price is now consolidating near the $2.30 zone and might aim for a fresh increase. XRP price started a fresh increase above the $2.280
placeholder
Token unlocks over $625 million this week across major projects SUI, OP, SOL, AVAX and DOGEAccording to Wu Blockchain, 11 altcoins with one-time tokens unlock more than $5 million each in the next seven days. The total value of cliff and linear unlocked tokens exceeds $625 million.
Author  FXStreet
4 Month 29 Day Tue
According to Wu Blockchain, 11 altcoins with one-time tokens unlock more than $5 million each in the next seven days. The total value of cliff and linear unlocked tokens exceeds $625 million.
placeholder
Gold price slides back closer to $3,300 amid tariff deals optimismGold price (XAU/USD) struggles to capitalize on the previous day's bounce from the vicinity of the $3,265-3,260 pivotal support and attracts fresh sellers during the Asian session on Tuesday.
Author  FXStreet
4 Month 29 Day Tue
Gold price (XAU/USD) struggles to capitalize on the previous day's bounce from the vicinity of the $3,265-3,260 pivotal support and attracts fresh sellers during the Asian session on Tuesday.
placeholder
Top gainers Virtuals Protocol, Floki, Hyperliquid: Altcoins extend gains alongside BitcoinThe cryptocurrency market sustains a market-wide bullish outlook at the time of writing on Tuesday, led by Bitcoin (BTC) and select altcoins, including Virtuals Protocol (VIRTUAL), Floki, and Hyperliquid (HYPE).
Author  FXStreet
4 Month 29 Day Tue
The cryptocurrency market sustains a market-wide bullish outlook at the time of writing on Tuesday, led by Bitcoin (BTC) and select altcoins, including Virtuals Protocol (VIRTUAL), Floki, and Hyperliquid (HYPE).
placeholder
Bitcoin’s Net Taker Volume Turns Positive, New All-Time High Incoming?Bitcoin gradual recovery continues, with the asset currently trading at $95,409 after posting a 1.7% gain over the past 24 hours. In the last two weeks, BTC has climbed nearly 15%, recovering
Author  NewsBTC
4 Month 29 Day Tue
Bitcoin gradual recovery continues, with the asset currently trading at $95,409 after posting a 1.7% gain over the past 24 hours. In the last two weeks, BTC has climbed nearly 15%, recovering
goTop
quote