Nvidia's (NVDA 6.18%) share price has jumped 187% over the past year as investors have turned their attention toward artificial intelligence (AI) stocks. But Nvidia's gains are more than just hype; the company is experiencing fantastic growth from its core business. 

The question is whether it's too late for investors to buy Nvidia, or if this tech stock will remain a winner over the long term. To help answer this question, let's take a look at what's happening with Nvidia right now, and what its long-term potential is.

What's going right for Nvidia 

Nvidia's GPUs have long been used in the gaming industry because of their ability to quickly and efficiently process high-quality graphics. And for many years the company's gaming segment was its bread and butter. 

A microchip with the letters "AI" on it.

Image source: Getty Images.

However, over the past few years tech companies have implemented Nvidia's GPUs into their data centers for complex machine learning and AI processing. That's shifted Nvidia's focus from making chips primarily for gaming to making chips for data centers -- with amazing results

Nvidia's data center segment sales skyrocketed 171% in the second quarter to $10.3 billion. That growth came from tech companies' ramped-up focus on bringing AI to their products and services. As Nvidia CEO Jensen Huang said in a press release, "Leading enterprise IT system and software providers announced partnerships to bring NVIDIA AI to every industry. The race is on to adopt generative AI."

Nvidia is clearly already benefiting from the surge in AI interest, and it's likely that this AI gold rush is just beginning. The AI chip market is worth $28 billion this year and will grow to an estimated $165 billion by 2030. Nvidia continues to release new AI technologies to stay ahead of its rivals, increasing the company's chances of remaining the top choice for AI processors.

What's going wrong for Nvidia

There's not much going wrong for Nvidia right now, except perhaps that the company's huge share price gains have made Nvidia's stock pretty expensive. Nvidia's shares currently have a price-to-earnings ratio of 96, much higher than the current tech average P/E ratio of about 30. In other words, Nvidia is not a value stock.

So buying Nvidia's stock right now means that you're paying a premium. But just because the stock is pricey doesn't mean it's overpriced. Right now the average price target among 38 analysts for Nvidia's stock is $645, representing a 52% increase from the company's share price as of this writing. 

Of course, just because analysts set a high price target for a stock doesn't mean it will get there. However, it does indicate that many analysts observing the company believe there could be much more upside from this stock, and based on the company's long-term opportunities in AI I think they could be right. 

Nvidia stock is a buy

There's no getting around the fact that Nvidia's stock is expensive, but I think the company's long-term opportunities from AI make up for it. AI is just getting started, and in the coming years companies of all sizes will likely be utilizing AI internally and adding to their products and services. 

The initial demand for chips for AI data centers is a good indication that the largest tech companies are serious about AI integration, and that should continue to keep Nvidia's chips in high demand for years to come. No stock is risk-free, of course, but if you're looking for a solid bet on the AI race, Nvidia is a great candidate.