Generative artificial intelligence (AI) is expected to contribute significantly to the global economy over the next decade by driving productivity gains across multiple industries. Goldman Sachs estimates that adoption of the technology could boost global GDP by 7% (or $7 trillion) over a 10-year period.

That's why now would be a good time for investors to load up on AI stocks that could benefit from this massive growth opportunity. Microsoft (MSFT 1.82%) and The Trade Desk (TTD 1.67%) are two such companies that are likely to win big from different applications of AI.

The AI case for Microsoft

Microsoft has established itself as an early mover in the AI market thanks to its investment in OpenAI, creator of the popular chatbot ChatGPT, which set the record for the fastest-growing app in history by clocking an active user base of 100 million just two months after its launch. Those investments have opened a healthy long-term growth opportunity for Microsoft, as the global chatbot market is estimated to grow at an annualized rate of 21% over the next decade to an expected $32 billion in annual revenue by 2032.

Microsoft has quickly moved to monetize its investment in OpenAI by launching a subscription tier for ChatGPT that starts at $20 a month. Given that ChatGPT reportedly had 180 million users in August, Microsoft and OpenAI already have a big pool of users to whom they can upsell their subscription service.

More importantly, Microsoft has been deploying OpenAI's algorithms across multiple services -- among them its workplace collaboration tools, cloud computing, and search. That's a smart strategy given the lucrative opportunities in these markets.

For instance, the office collaboration and productivity market is expected to generate $116 billion in annual revenue in 2033, up from an estimated $39 billion this year, according to Future Market Insights. Microsoft is one of the leading players in this space: Its Office 365 suite of workplace collaboration tools controls 45% of the market. So it's important for Microsoft to maintain a healthy share of this market so that it can take advantage of the long-term growth opportunity it presents.

This explains why Microsoft is rolling out Copilot for enterprise customers on Nov. 1. That new offering will allow them to deploy AI tools across multiple applications in the Microsoft 365 suite such as Word, Outlook, Excel, and OneNote. What's more, Microsoft is deploying its AI chops in bigger markets such as cloud computing.

Allied Market Research estimates that the AI-powered cloud computing market will grow at a healthy annualized rate of 36% over the next decade, generating a whopping $887 billion in revenue in 2032. Microsoft's Azure cloud service is in a nice position to capitalize on this massive opportunity as it is the second-largest provider of global cloud infrastructure services, with a market share of 23%.

Microsoft is already offering AI solutions on its Azure cloud platform, giving enterprises access to multiple large language models. The good part is that thousands of organizations have already started using Microsoft's cloud-based AI offerings, suggesting that the company is on its way to capitalize on this opportunity.

In short, Microsoft is tapping multibillion-dollar markets with AI tools that could drive consistent growth over the next decade. Management expects AI to become the fastest-growing $10 billion business in the company's history, with some other estimates suggesting that ChatGPT alone could boost its top line by $40 billion in the long run.

All this makes Microsoft a top AI stock to buy and hold for the next decade.

The AI case for The Trade Desk

The application of AI in the digital marketing and advertising market is set to grow rapidly, with one third-party report estimating that this space could clock annualized growth of 27% through 2030, at which point it would generate annual revenue of roughly $79 billion. The Trade Desk gives investors a chance to take advantage of the application of AI to the advertising market with its programmatic platform that helps advertisers, agencies, and brands buy ad inventory in real time to drive greater returns on their ad spending.

Citing a Statista survey, The Trade Desk points out that 41% of marketers have witnessed a jump in revenue growth along with improvements in ad performance after deploying AI in their campaigns. That's not surprising, as AI analyzes huge volumes of data to improve audience targeting and optimize ad campaigns in real time to improve their performance.

The Trade Desk has been giving advertisers access to AI tools since 2018, when it released Koa, an AI platform that analyzes data from more than 600 billion queries each day. The company has now upgraded its AI platform with the launch of Kokai, which will give advertisers access to more than 13 million advertising impressions each second so that they can "buy the right ad impressions, at the right price, to reach the target audience at the best time."

The good part is that The Trade Desk has already been delivering robust growth thanks to the proliferation of programmatic advertising. Analysts expect The Trade Desk's revenue will grow by 23% in 2023 to $1.95 billion, with similar growth forecast over the next couple of years.

TTD Revenue Estimates for Current Fiscal Year Chart

TTD Revenue Estimates for Current Fiscal Year data by YCharts.

It is worth noting that TechNavio forecasts that the programmatic advertising market will clock 32% annualized growth over the next five years, adding roughly $434 billion in revenue. AI is likely to act as a catalyst for this market and unlock a stronger growth opportunity for The Trade Desk over the next decade, which is why investors should consider buying this stock before it flies higher following its impressive gains of 77% so far this year.