The markets have continued the strong rally so far in 2024. The Nasdaq Composite is closing in on a new all-time high, while the S&P 500 is already there after rising 22% over the last 12 months.

In such a bullish year for the markets, the one opportunity that everyone is talking about is artificial intelligence (AI) and which companies are likely to benefit over the next decade. This was a key theme driving shares of Nvidia (NVDA 6.18%) and Alphabet (GOOGL 10.22%) (GOOG 9.96%) higher in 2023, and two Wall Street pros see even more upside.

Here's why analysts remain bullish on these two tech stocks.

1. Nvidia: 76% upside

Nvidia is the lead supplier of chips needed for AI training, and the business has been growing like there's no tomorrow. But even after the stock's monster run last year, Rosenblatt Securities analyst Hans Mosesmann sees shares of Nvidia reaching $1,100 in the next 12 to 18 months. That is 76% higher than the current share price of $625.

Nvidia has long dominated the market for graphics processing units (GPUs) and is estimated to control up to 95% of the market for AI chips. GPUs have become the gold standard for training AI models and running massive supercomputers and data centers. They are fundamentally faster and operate with better energy efficiency than central processing units (CPUs).

The stock is currently trading at a price-to-earnings (P/E) ratio of 50 based on Wall Street's earnings estimate for the fiscal year ending in January, but that could be a lot cheaper by next year. Analysts expect Nvidia's earnings per share to increase by another 67% over the next year. That would bring Nvidia's P/E down to 30.

Nvidia's growth so far has been mostly fueled by the consumer internet giants and cloud service providers, but CEO Jensen Huang sees another wave of demand on the way.

In the company's fiscal third-quarter earnings report, Huang said, "Nations and regional [cloud service providers] are investing in AI clouds to serve local demand, enterprise software companies are adding AI copilots and assistants to their platforms, and enterprises are creating custom AI to automate the world's largest industries."

Indeed, the AI opportunity has years to play out, as it will take time for every industry to discover ways to use AI, not to mention time for data centers to upgrade their hardware systems to handle the tremendous data workloads.

I believe the stock can move higher this year, but regardless of how it performs in the near term, investors should expect Nvidia's stock price to be a lot higher in 10 years than it is today.

2. Alphabet: 21% upside

Another top AI stock that Wall Street is bullish about is Google owner Alphabet. The stock returned 58% in 2023, outperforming the Nasdaq's 43% gain on the year, but Barclays analyst Ross Sandler sees the stock reaching $180 in the next 12 to 18 months, or 21% higher than the current share price of $149.

The rapid adoption of AI plays right into the hands of Google, one of the biggest investors in AI technology. It helps companies manage and run their ad campaigns on Google Search and YouTube, which gets to the heart of why investors are optimistic about the company's prospects. Advertising drives three-quarters of Alphabet's total revenue.

The company recently introduced a new AI-driven feature called Circle to Search that enables users to find information about an object in an image or video by simply highlighting it. It's a good example of how AI will grow the value of Alphabet's advertising business.

Search already brings in $44 billion in quarterly revenue for the company, and it grew 11% year over year in the 2023 third quarter, primarily driven by retail ad spending. New AI-driven search tools could lead to higher user engagement, more search queries, and more shoppable ads.

The stock trades at a forward P/E of 22. This valuation seems more than fair for the leading digital advertiser, which generated $66 billion in profit over the last year and is not done growing.

Given the importance of AI to Google's business and its ability to profit from this technology, investors should expect the stock price to hit new highs over the next few years.