Two trendy artificial intelligence (AI) stocks have led the S&P 500 higher in 2024. When the market closed on April 24, Nvidia (NVDA -0.16%) and Super Micro Computer (SMCI 0.41%) had notched year-to-date gains of 61% and 166%, respectively, surpassing every other stock in the index. Even so, certain Wall Street analysts are forecasting substantial gains for shareholders over the next year.

Specifically, Hans Mosesmann at Rosenblatt recently raised his price target on Nvidia to $1,400 per share, implying 69% upside from the current price of $826 per share. Similarly, Ananda Baruah at Loop Capital recently raised his price target on Super Micro Computer to $1,500 per share, implying 91% upside from the current price of $787 per share.

Investors should never fixate on forecasts, especially forecasts that come from individual analysts, but Nvidia and Supermicro warrant further consideration.

Nvidia: a 61% year-to-date gain

Nvidia specializes in accelerated computing, a discipline that uses specialized hardware and software to speed up complex data center workloads like 3D simulations, visualizations, and artificial intelligence. Nvidia dominates the market for data center accelerators due to its invention of the graphics processing unit (GPU) in 1999 and its subsequent launch of the CUDA programming model in 2006.

While GPUs were initially designed to accelerate graphics workloads, CUDA let developers unlock their parallel processing capabilities for other applications. Ultimately, that innovation led Nvidia to the top of the supercomputer accelerator market. According to analysts, the company accounted for 98% of data center GPU sales and 92% of generative AI processor sales last year.

The CUDA ecosystem has expanded over the years, so developers can now build all sorts of GPU-accelerated applications. Moreover, Nvidia now sells subscription software and cloud services built atop CUDA. For instance, Nvidia AI Enterprise is a software platform that streamlines AI application development across various use cases, from recommender systems in retail to route optimization in logistics to computer vision in robotics.

Nvidia reported stellar financial results in the fourth quarter. Revenue rose 265% to $22.1 billion, and non-GAAP net income soared 486% to $5.16 per diluted share. That momentum was driven by demand for data center products, especially those related to AI. Additionally, Nvidia said its nascent software and services business reached an annual revenue run rate of $1 billion, showing that the company is successfully diversifying beyond GPUs.

Management guided for revenue growth of 190% in the first quarter. At the same time, the company expects non-GAAP operating expenses to climb just 56%, implying that earnings will once again increase much faster than revenue. That momentum is bound to slow at some point, but Nvidia is undoubtedly well positioned to monetize AI.

Wall Street expects Nvidia to grow earnings per share at 35% annually over the next three to five years. That consensus forecast makes its current valuation of 69.3 times earnings look somewhat pricey; I doubt shareholders will see 69% upside over the next year. More importantly, while I think patient investors can purchase a very small position today, I would personally feel more comfortable buying shares if the PEG ratio -- currently at 1.98 (69.3 divided by 35) -- were closer to 1.5.

Super Micro Computer: a 166% year-to-date gain

Super Micro Computer develops and manufactures high-performance computing platforms comprising server, storage, and networking solutions. Its products incorporate technologies from suppliers like Nvidia, Intel, and Advanced Micro Devices, and they address various use cases across enterprise data centers and cloud data centers, including artificial intelligence.

Supermicro is laser-focused on rapid development, such that it often beats peers to market with new products. To quote Hans Mosesmann at Rosenblatt, "Supermicro has developed a model that is very, very quick to market. They usually have the widest portfolio of products when a new product comes out from Nvidia or AMD or Intel." That advantage is helping Supermicro gain ground on competitors like Dell Technologies and Hewlett Packard Enterprise. The company accounted for 10% of AI server sales last year, but that figure will reach 17% by 2026, according to analysts at Bank of America.

Supermicro reported strong financial results in its fiscal second quarter (ended Dec. 31). Revenue increased 103% to $3.6 billion and non-GAAP net income jumped 71% to $5.59 per diluted share. Better yet, management expects revenue and non-GAAP earnings per share to soar 205% and 244%, respectively, in the third quarter.

Like Nvidia, Supermicro cannot maintain triple-digit growth indefinitely, but the company is certainly well positioned to benefit as businesses spend more on AI. Wall Street expects Supermicro to grow earnings per share at 50% annually over the next three to five years. In that context, the current valuation of 61.5 times earnings looks relatively reasonable, despite being a significant premium to the three-year average of 21.1 times earnings.

Personally, I doubt Supermicro stock will return 91% over the next 12 months, but I would be comfortable buying a small position today. However, before investors add shares to their portfolios, they should be aware of a near-term risk. Supermicro broke precedent earlier this month when it chose not to announce preliminary results for the third quarter. That sent the stock tumbling on April 19.

It's possible the official earnings report -- slated for release on April 30 -- contains some very disappointing news. Alternatively, management may have decided to skip preliminary results because the quarter went precisely as expected.