What a difference a few months makes. After being beaten down for much of last year, Nvidia (NVDA 3.62%) stock has come roaring back, with shares up 200% (as of this writing) thus far in 2023, more than 13 times the gains of the S&P 500. This is also in stark contrast to its performance in 2022 when the stock crashed 50%.

What's driving the mind-boggling gains? In short, the accelerating adoption of artificial intelligence (AI) and the company's robust forecast. Furthermore, Nvidia suggested that the slump in graphics cards used by gamers -- which has weighed heavily on the company's results -- could be on the verge of a recovery.

What does this mean for investors who missed out on Nvidia's recent blistering returns? Should they buy the stock now in hopes of further gains or take a hard pass because of the company's nosebleed valuation? Let's review the data to see what it reveals.

Nvidia H100 AI processor.

Image source: Nvidia.

What was behind Nvidia's slump?

Make no mistake, 2022 was a tough year for the maker of graphics processing units (GPUs), a factor investors would do well to remember. The combination of high inflation, rising interest rates, and the general market downturn weighed heavily on Nvidia last year. For its 2023 fiscal year (ended Jan. 29), revenue of $27 billion was flat year over year, but that only tells part of the story. 

Nvidia's gaming segment -- which has historically represented the majority of the company's revenue -- slumped for most of the past year, down 33%, 51%, and 46% year over year, respectively, in the second, third, and fourth quarters. Hard-core gamers, faced with the uncertain economy and high inflation, decided to make do with their existing graphics cards rather than upgrading to Nvidia's latest offering.

The company's saving grace was its data center business, which grew 41% last year, helping take up the slack for its flailing gaming segment.

Let's not forget, however, that Nvidia is still the undisputed leader in the discrete desktop GPU market, even as sales have slumped industrywide. The company controls an unrivaled 84% share of the market, according to data supplied by Jon Peddie Research (via Tom's Hardware). Earlier this year, CEO Jensen Huang suggested the worst was over. "Gaming is recovering from the post-pandemic downturn, with gamers enthusiastically embracing the new Ada architecture GPUs with AI neural rendering," he said. 

What could drive Nvidia stock higher

Beyond the anticipated rebound in the graphics card market, the evolution of AI technology is now front and center and helping drive Nvidia's monumental gains so far this year.

In its fiscal 2024 first quarter (ending Jul. 31), Nvidia's management stunned Wall Street when the company forecast revenue of $11 billion for the coming quarter, an increase of 64% year over year and 53% sequentially. 

Huang explained what was driving its eye-catching guidance. "The computer industry is going through two simultaneous transitions -- accelerated computing and generative AI," which were fueling robust demand. He went on to suggest that this could be just the beginning. "A trillion dollars of installed global data center infrastructure will transition from general purpose to accelerated computing as companies race to apply generative AI into every product, service, and business process," Huang said.

Why does this matter for Nvidia? The company makes the market-leading processor used to train and run AI systems. In fact, recent data suggests Nvidia controls as much as 95% of the market for semiconductors used in machine learning, according to data compiled by New Street Research. 

Estimates vary wildly regarding the size of the addressable AI market. A report by investment bank Goldman Sachs estimates that AI will increase labor productivity, driving a 7% or $7 trillion increase in global GDP. Analysts at Morgan Stanley are only slightly less bullish, citing a $6 trillion opportunity. 

But is the stock a buy?

As with so many things, the answer is "it depends." Some investors will look at Nvidia's valuation and simply take a hard pass based on that alone. The sentiment is certainly understandable, as the stock is currently selling for 56 times forward earnings and 21 times forward sales, making it expensive by any measure.

However, for investors with a long-term outlook and a rock-solid constitution, Nvidia is still worth a look. While the stock could face a meaningful correction in the coming months, the long-term opportunity is significant. Nvidia is a picks-and-shovels play for the ongoing AI gold rush. Wedbush analyst Daniel Ives recently called AI the "fourth industrial revolution," suggesting the resurgence in AI could run for the next decade, helping drive the market leader to new heights. 

Given the magnitude of the opportunity and the potential that accelerating demand for AI could run for years, I would suggest that Nvidia is worth the higher price. Simply buy a bit now and more once it grows into its lofty valuation.