The rapid adoption of artificial intelligence (AI) is expected to give the global economy a big boost in the long run, with PricewaterhouseCoopers (PwC) estimating that this technology could contribute a whopping $15.7 trillion, or 14%, to the global gross domestic product (GDP) by 2030.

PwC points out that AI-focused economic gains will be driven by an improvement in productivity, as well as new products that are likely to boost consumer demand. Not surprisingly, investors have been buying AI stocks hand over fist over the past year to take advantage of this huge end-market opportunity.

More importantly, the massive economic potential of AI suggests that buying and holding solid AI stocks for a really long time could give investors impressive returns, as they will be able to benefit from the power of compounding while capitalizing on a rapidly growing market.

That's why if you have investible cash of $200,000 after paying your bills, clearing high-interest loans, and saving enough for bad times, it may be a good idea to put that money into shares of both Nvidia (NVDA 6.18%) and Snowflake (SNOW 3.69%). These stocks could help you become a millionaire, or at least get close to that milestone, as part of a diversified portfolio. Let's see how.

1. Nvidia

Nvidia has seen a big surge in demand for its graphics processing units (GPUs) thanks to AI, leading to eye-popping growth in the company's revenue and earnings in recent quarters. The market has rewarded Nvidia's impressive growth with solid gains, which explains how the stock would have turned a $200,000 investment into $659,000 in the past year.

NVDA Chart

NVDA data by YCharts

However, a closer look at Nvidia's AI-related opportunity indicates that the company is just getting started. Market research provider IDTechEx estimates that the market for AI chips could generate $258 billion in annual revenue in 2033, growing at an annual rate of 24% over the next decade.

Nvidia's market share of more than 80% in AI chips means that it is in a prime position to make the most of this multibillion-dollar market opportunity. The company's revenue tripled year over year in the last reported quarter to $18.1 billion as its data center revenue shot up 279% to $14.5 billion.

Nvidia is taking steps to ensure that it maintains its dominant position in this market by accelerating its product roadmap and increasing chip supply, which could help ensure robust growth in the years to come.

Assuming Nvidia manages to control even 50% of the AI chip market in a decade, its data center revenue could jump to almost $130 billion based on IDTechEx's estimate of the size of this market in 2033. That would be a huge jump over the $15 billion revenue Nvidia's data center business generated in fiscal 2023.

There are also other catalysts that could send the company's top and bottom lines soaring in the long run, such as the AI-enabled personal computer (PC) market, cloud gaming, digital twins, and automotive. This explains why Nvidia's earnings are expected to clock annual growth of 102% over the next five years, up significantly from the 48% annual earnings growth it clocked in the last five years.

A $200,000 investment made in Nvidia stock five years ago would now be worth almost $2.9 million. Given that the company is expected to deliver even faster earnings growth over the next five years, there is a chance that it may be able to replicate its sizzling rally, deliver outstanding returns to investors, and even help them become millionaires.

2. Snowflake

Snowflake provides a cloud-based data platform that gives customers access to multiple functions such as data warehousing, data lakes, data science, data engineering, and secure sharing on a single interface. You may be wondering how Snowflake is going to benefit from the AI boom, but the cloud-based services that Snowflake provides could witness a jump in adoption thanks to AI.

That's because training large language models (LLMs) requires access to massive amounts of data. For example, the amount of data needed to train ChatGPT and GPT-4 LLMs reportedly exceeded 45 terabytes (TB). As a result, having access to high-quality data for training LLMs is crucial. This is where Snowflake steps in.

In June 2023, Nvidia announced that it was partnering with Snowflake to allow businesses to "create customized generative AI applications using their own proprietary data, all securely within the Snowflake Data Cloud." The ability of enterprises to create custom LLMs using their own data to speed up their business processes in a secure environment could open up a new growth opportunity for Snowflake.

A survey of more than 300 businesses and AI experts by enterprise AI company Expert.AI in April 2023 revealed that almost 40% of the respondents were planning to build custom enterprise LLMs. This illustrates why demand for Snowflake's data platform could increase, especially considering that it has taken steps to help enterprises build LLMs in a cost-effective manner with the Snowflake Cortex platform.

Snowflake customers who stored their data on the company's platform can use Cortex, a fully managed offering, to extract information from unstructured data, translate text, summarize documents, and build custom applications quickly. Enterprises are getting access to this facility without having to invest in expensive hardware, which is all the more reason why the demand for Snowflake's offerings could increase.

Not surprisingly, Snowflake expects its addressable market to increase rapidly in the long run. The company was sitting on a total addressable market (TAM) worth $140 billion in 2022. It expects this market to more than double to $290 billion in 2027. It is worth noting that Snowflake has generated $2.6 billion in revenue over the trailing 12 months, so it is scratching the surface of a huge opportunity.

The company is expected to finish the current fiscal year with $2.8 billion in revenue, up 35% from the prior year. Snowflake's earnings are forecast to more than triple in fiscal 2024 to $0.80 per share. As the following chart shows, Snowflake's top and bottom lines could keep heading higher in the next couple of fiscal years as well.

SNOW Revenue Estimates for Next Fiscal Year Chart

SNOW Revenue Estimates for Next Fiscal Year data by YCharts

What's more, analysts are forecasting Snowflake's earnings to increase at an annual rate of 66% over the next five years. At this pace, the company's earnings could hit $10 per share in fiscal 2029. Multiplying the projected earnings with the Nasdaq-100 index's (which is used as a proxy for tech stocks) price-to-earnings ratio of 30 points toward a stock price of $300, which would be a 58% jump from current levels.

However, Snowflake is trading at 175 times forward earnings right now. It could maintain a premium valuation in five years thanks to its impressive growth and a new catalyst in the form of AI. Investors aiming at becoming millionaires can team their Snowflake investment with an investment in Nvidia, both of which look like solid picks in a diversified portfolio.