Artificial intelligence (AI) isn't just dominating the conversation in investment circles this year -- the technology is actually finding its way into the products and services we use each day. That trend is unlikely to slow down. An estimate from research firm McKinsey & Company suggests 70% of organizations will be using AI in some way by 2030.

Considering AI is already involved in shaping social media experiences, monitoring financial transactions, and powering recommendations on entertainment platforms, it's not hard to imagine a world where that's the case. 

McKinsey's research predicts the technology will add $13 trillion to global economic output by 2030, and it says the companies that move first will earn the biggest share of that pie. By integrating AI today and developing it through 2030, McKinsey estimates the average business will see its free cash flow soar by 122%. But those that don't have an AI plan by then could see a 23% decrease instead!

What strategy can investors use to make money from those early adopters? Buying shares in AI service providers like Splunk (SPLK) and Google parent Alphabet (GOOGL -1.45%) (GOOG -1.55%) might be the way to go because companies will likely have to spend money with them on their AI journeys. Here's why investors could be set for gains in both of these stocks.

1. Splunk

Machine learning is an important subfield of AI that involves using high volumes of data to rapidly improve business systems and processes. Splunk provides a leading platform for organizations wanting access to that technology, and it currently serves more than 90 Fortune 100 companies.

Most investors probably wouldn't associate beer brewing with machine learning, but Heineken distributes 13 billion gallons of its alcoholic brew per year, and ensuring consistency between batches -- not to mention managing the herculean logistical effort -- requires extreme precision. The company employs 5,000 digital applications across its business, and it uses Splunk to ingest the 25 million data points sent between them every single month. From there, Splunk delivers real-time insights to help Heineken manage brewing, inventory, pricing, and distribution, even accounting for the small details like weather patterns.

But that's just a taste of Splunk's diverse customer base, which also includes car manufacturers, pizza places, and even the McLaren Formula 1 racing team. 

In the fiscal 2024 first quarter (ended April 30), the number of customers spending at least $1 million on Splunk's platforms annually jumped 17% year over year to 810. But the number of clients spending at least $1 million on cloud-based iterations alone increased by a whopping 31% to 433. The cloud makes it easier for customers to deploy Splunk's tools and access them from anywhere, so it's becoming a key driver of growth for the company. 

Splunk has battled steep financial losses for years, but thanks to the appointment of a new CEO in April 2022, the company is now turning its operational success into surging free cash flow (FCF). The company generated $486 million in FCF in the fiscal 2024 first quarter, which was more than it delivered for the entirety of fiscal 2023. Improving that metric became a priority for Splunk in this tough economic environment because investors seem to punish the stock prices of companies that lose money. 

Speaking of which, Splunk stock remains down 54% from its all-time high, but it has delivered a gain of 18% this year on the back of its improving financials and more positive investor sentiment toward the technology sector. As AI continues on its journey to mainstream adoption in the corporate world, Splunk will likely continue to be a popular provider, so this might be a great time to buy in. 

2. Alphabet

There has been plenty of speculation this year about the future of Google Search (and traditional search engines in general) following the rise of OpenAI's ChatGPT chatbot. Microsoft (MSFT -1.73%) made a sizable investment in OpenAI, and it recently integrated ChatGPT into its Bing search engine, as well as its Office 365 document suite, Edge web browser, and Azure cloud platform. 

Prompting a chatbot for information feels more convenient than running an internet search the traditional way, which requires the user to sift through a list of results to find the specific answer they're looking for. Google has its own chatbot called Bard, which should help it retain its dominant 93% market share in the search industry in the short term, but it's tough to know how the landscape will shift in the long run. Given chatbots are likely to be embedded inside consumers' favorite applications going forward, it's unclear whether they'll still need to visit search engines like Google. 

That said, Google Cloud might be the reason investors want to buy Alphabet stock today. It serves almost 60% of the world's 1,000 largest companies, and it's the fastest-growing piece of Alphabet's business, with revenue increasing by 28% in the first quarter of 2023 (ended March 31), which even beat key cloud competitors Microsoft Azure and Amazon Web Services. 

Google Cloud provides a host of AI-powered services to its business customers. They include ready-made natural language models to help convert speech to text (and vice versa), translate different languages, create conversational experiences for consumers, and even draw insights from image and video-based media. Google says customers are even using its cloud-based AI services to train models for self-driving vehicles, with Mercedes-Benz being one notable brand on its roster. 

If 70% of companies are using AI by 2030 as McKinsey predicts, Google Cloud could be a go-to provider. 

Based on Alphabet's $4.49 in trailing-12-month earnings per share, its stock currently trades at a price-to-earnings (P/E) ratio of 27.5. That's a slight discount to the average P/E of other big tech companies, represented by the Nasdaq-100 index, which trades at a P/E of 30 right now. That makes Alphabet stock a good value, though investors should pay close attention to the performance of its search segment over the next few quarters to make sure it's not losing revenue to competitors like Microsoft Bing.