Artificial intelligence (AI) has been a driving force behind some of the best-performing technology stocks this year:

  • Nvidia stock has soared 214% on the back of its dominant AI data center chips.
  • Meta Platforms shares have jumped 152% partly because AI feeds users more relevant social media content, which makes them spend more time on Facebook and Instagram. 
  • Amazon stock has gained 61% as it continues to develop its own AI hardware and software.

In short, investors who don't own AI stocks have likely underperformed the broader stock market in 2023. But the AI revolution is just beginning, and there will be plenty of opportunities in this emerging industry over the long term.

Below are three stocks investors can buy right now to capture the potential of AI. 

An IT professional analyzing a laptop while plugged into a server.

Image source: Getty Images.

1. Microsoft is already making money from AI in the cloud

Microsoft (MSFT 1.82%) is the world's second-largest company, with a valuation of $2.6 trillion. It didn't get there by standing still; while its foundational software development business is very much alive, the tech giant has expanded into other areas like gaming, hardware, cloud computing, and now, artificial intelligence.

At the start of this year, Microsoft invested $10 billion in leading AI developer OpenAI, which is responsible for the ChatGPT AI-driven chatbot. The trillion-dollar behemoth has since been busy integrating OpenAI's technology into its product portfolio, including the 365 document suite, the Bing search engine, the Windows operating system, and the Azure cloud platform.

The Azure OpenAI Service segment could be one of Microsoft's greatest-ever financial opportunities because it allows cloud customers to access the latest GPT-4 AI model to build upon for their own purposes. The service has scaled from around 200 business customers at the start of 2023 to over 18,000 as of the end of September.

In the recent fiscal 2024 first quarter (ended Sept. 30), Azure's total revenue increased by 29% year over year, and Microsoft said AI was responsible for 3 percentage points of that growth -- or triple the amount it contributed in Q4.

Plus, Microsoft is gearing up for the wide release of its Copilot software, which injects AI into popular programs for businesses like Word, Excel, PowerPoint, and Outlook. It will cost $30 per user per month, and Microsoft says it already has tens of thousands of users across 40% of the Fortune 100 companies in the early access program.

Given the diverse nature of Microsoft's business -- and its broad approach to AI overall -- its stock might be one of the safest bets in this new industry over the long term.

2. DigitalOcean will be a critical on-ramp to AI for small businesses

Like Microsoft Azure, DigitalOcean (DOCN 3.30%) is a provider of cloud computing services. However, unlike Azure, DigitalOcean isn't backed by a trillion-dollar parent company -- it's worth just $2.2 billion.

The company focuses on serving small to midsize businesses, from start-ups to those with 500 employees, which is an underserved niche among the larger cloud providers. DigitalOcean offers cheap and transparent pricing combined with highly personalized service, but its greatest strength is its simplified platform, which is friendly to the smallest of enterprises without in-house technical teams.

Thanks to the acquisition of PaperSpace in July, DigitalOcean can now offer advanced AI services to its customers in the cloud. PaperSpace offers powerful data center infrastructure fitted with Nvidia's chips just like Azure, except its pricing is up to 70% cheaper. It achieves that in a couple of ways. It offers per-second billing so customers never pay for more than what they use, and given that PaperSpace is a specialist provider of AI cloud services, it doesn't have a bloated cost structure from maintaining other cloud segments, so its pricing can be more streamlined.

DigitalOcean is only a few months into the PaperSpace acquisition, but the company says it's experiencing strong demand for AI services and it's excited about the deal's potential to expand its addressable market.

DigitalOcean's revenue only increased 16% year over year during the recent third quarter of 2023 (ended Sept. 30), which was much slower than its 37% growth rate from a year ago. But the company has focused on managing costs to boost profitability, and it's succeeding in that department. DigitalOcean's earnings per share (profit) surged 150% year over year to $0.20, and that trajectory is important to sustaining its business without further cash injections in the future.

DigitalOcean stock carries a little more risk than Microsoft as an investment, but the company is chasing an addressable opportunity that could exceed $195 billion by 2026, so it might deliver substantial upside in the long run.

3. C3.ai is a stand-alone enterprise AI specialist

Founded in 2009, C3.ai (AI 3.02%) is one of the first companies in the world to focus on AI as its core business. Today, it boasts a portfolio of more than 40 AI applications that it sells to hundreds of corporate customers in over a dozen different industries. For many of those customers, C3.ai's applications form the foundation of their AI strategy.

The oil and gas industry has been one of C3.ai's largest sources of revenue throughout the company's history. That isn't a sector investors would normally associate with new technologies like AI, but that's the point: C3.ai serves as a critical bridge to this revolution for industries that normally don't have the talent or financial resources to develop it from scratch.

Fossil fuel giant Shell uses C3.ai's applications to monitor over 10,000 items of equipment to conduct preventative maintenance and predict catastrophic failures. It also uses applications to help reduce carbon emissions, which is important given the oil and gas industry is under intense scrutiny for its contribution to climate change.

C3.ai's technology has also been recognized by the world's largest cloud providers including Amazon Web Services, Microsoft Azure, and Alphabet's Google Cloud. All three of them now have joint-selling agreements with C3.ai to deliver its technology to their cloud customers because of its turnkey nature, which allows them to quickly scale their AI development.

C3.ai is in the middle of a crucial revenue transition. It's moving away from subscription-based pricing and onto a consumption model instead. This has triggered a temporary stall in the company's revenue growth while customers adjust to the change and ramp up their usage, but management anticipates revenue will return to growth of as much as 20% in the current fiscal 2024 year.

C3.ai CEO Thomas Siebel thinks AI is a megamarket event akin to the dawn of the internet or the invention of the smartphone, so this could be a great time for investors to buy into a company that's right in the middle of what's happening in the AI revolution.