Artificial intelligence (AI) has been a key growth driver for numerous companies over the past year, and investors are buying AI stocks hand over fist to make the most of this technology that's expected to grow rapidly over the next decade.

Allied Market Research estimates that the global AI market could generate annual revenue of $3.6 trillion in 2033, up from $153 billion last year. That would amount to an impressive compound annual growth rate of 37%. That's why now would be a good time for investors to put their money in a couple of top AI stocks that could win big from this market over the next decade.

Microsoft (MSFT 1.82%), for instance, stands to gain from the proliferation of AI on multiple fronts, while Palantir Technologies (PLTR 3.73%) is expected to become another potential beneficiary of the growing investments in AI software.

1. Microsoft

OpenAI's popular chatbot ChatGPT kicked off the generative AI craze toward the end of 2022. Microsoft was an early backer of OpenAI, and has expanded its investment in it, firming up a collaboration that enabled it to integrate AI-related services into multiple platforms.

From AI in the cloud to workplace collaboration tools and now gaming, Microsoft is set to tap several multibillion-dollar markets that AI is likely to create. For instance, the adoption of AI services in the cloud is anticipated to grow at an annual rate of nearly 36% through 2032. If that forecast proves accurate, the size of the cloud AI market could increase from just $42 billion in 2022 to a whopping $887 billion in 2032.

With Microsoft's Azure controlling 22% of the global cloud infrastructure service market (according to Synergy Research Group), the company seems well set to capture a big chunk of the incremental growth opportunity on offer. The good part is that Microsoft's cloud-based AI services are already gaining impressive traction. CEO Satya Nadella pointed out on the company's October earnings call that "more than 18,000 organizations now use Azure OpenAI service, including new-to-Azure customers."

This service provides customers access to multiple large language models that they can use to build AI applications and deploy them as per their use cases. Microsoft customers won't have to invest in expensive hardware -- they'll simply pay for the services they use. So it won't be surprising to see more enterprises flocking to this platform in the future to develop AI applications for their businesses.

Additionally, Microsoft has also set its sights on the generative AI-powered video gaming market. In November, Microsoft announced a partnership with Inworld AI through which it aims to provide a platform to game developers and creators to help create scripts, narratives, and characters with the help of generative AI. This could unlock a new opportunity for Microsoft as generative AI-focused video gaming spending is forecast to grow from just $190 million in 2022 to $69 billion in 2032, according to Bloomberg Intelligence.

The adoption of Microsoft's AI services has started driving tangible growth for the company. Its revenue growth is expected to accelerate as well following an increase of 7% in the last fiscal year to $212 billion.

MSFT Revenue Estimates for Current Fiscal Year Chart

MSFT Revenue Estimates for Current Fiscal Year data by YCharts.

Given the massive AI-fueled catalysts Microsoft could take advantage of in the coming decade, the company should be able to sustain its impressive growth momentum for a long time. That's why investors looking to buy and hold an AI stock for the next decade should consider Microsoft for their portfolios.

2. Palantir Technologies

The growth of Palantir Technologies is also expected to accelerate in 2024 and beyond, with AI set to be a key growth driver for a company that first made its name by supplying software platforms to U.S. government agencies and the intelligence community.

Palantir still relies on government contracts for a significant chunk of its business. In 2023's third quarter, the company generated $308 million in government revenue, which was 55% of its top line. It is worth noting that government agencies have been tapping Palantir for its AI expertise. The company landed notable contracts from the U.S. Army and the U.S. Special Operations Command (USSOCOM) totaling more than $700 million.

The U.S. government's spending on AI increased 61% during the three-year period from fiscal 2020 to fiscal 2022 to $2.3 billion. The recent contracts that Palantir has been awarded suggest that government agencies are looking to accelerate their AI spending, which is not surprising considering the pace at which the global AI market is anticipated to grow over the next decade.

More importantly, commercial customers also started tapping Palantir's AI expertise. The company claims that its Artificial Intelligence Platform (AIP) allows customers to accomplish more with less resources and time. On its November earnings call, management highlighted that Palantir had "tripled the number of AIP users last quarter and nearly 300 distinct organizations have used AIP since our launch just five months ago."

Palantir was the leading player in the market for AI software platforms, which was worth $14 billion in 2021 and grew at an impressive pace of 37% that year, as per IDC. According to another third-party estimate, the AI software platform market will clock annual growth of 31% through 2030, at which point it will be generating a whopping $279 billion in annual revenue.

As such, it is not surprising to see why Palantir's revenue growth is expected to accelerate following an estimated jump of 17% to $2.22 billion in 2023.

PLTR Revenue Estimates for Current Fiscal Year Chart

PLTR Revenue Estimates for Current Fiscal Year data by YCharts.

What's more, analysts expect its earnings to increase at an annual rate of 85% for the next five years. Assuming its bottom line increases at a relatively conservative 40% for the next five years, its earnings could increase to $1.35 per share in 2029.

Using the Nasdaq-100 as a proxy for the tech sector broadly, we can multiply that earnings per share number by the index's forward earnings multiple of 29 to get a forecast stock price of $39. That would be a 144% jump from current levels.

Considering its position in the fast-growing market for AI software platforms and a fast-growing customer base that could help it capitalize on this opportunity, Palantir could sustain its impressive run beyond the next five years. All this indicates that it could turn out to be a top growth stock for the next decade, which is why investors may want to buy it before it jumps further following last year's terrific gains.