Nvidia (NVDA 1.74%) has proven itself to be at the center of the artificial intelligence (AI) revolution. The company designs the most sought-after AI chips to power the performance of AI models and has expanded into a full range of AI products and services, from networking to enterprise software and even a new compute marketplace offering.

All of these efforts have helped Nvidia's earnings roar higher, and the company ended the latest fiscal year at a record revenue level of $130 billion. To further illustrate the pace of growth, investors only have to look back two years. Then, Nvidia's annual revenue totaled $27 billion. Nvidia clearly has been a winner in this AI boom.

This victory extends to stock price performance, with the shares climbing a jaw-dropping 1,500% over the past five years to reach a new high this week. Now the logical question is: Should you buy Nvidia at this high or wait for a lower entry point?

A person traces a line higher in the air while standing on a city street.

Image source: Getty Images.

Nvidia's role in the AI story

Nvidia has played and surely will continue to play a pivotal role in the AI story. Nvidia sells the most powerful graphics processing units (GPUs) on the market and has designed a variety of other products to accompany them. So customers, for example, might use Nvidia GPUs along with its high-speed connection NVLink so processors can share data. Customers may opt for Nvidia application software to build AI agents and various AI workflows, or the company's infrastructure software to manage processes.

And just recently, Nvidia launched DGX Cloud Lepton, a marketplace where developers can access GPUs from a variety of connected cloud providers.

Thanks to its innovation throughout the AI universe, Nvidia has made itself an almost unavoidable option for most companies aiming to develop and apply AI to their businesses. Importantly, Nvidia also has been first to market with many of its products and services, allowing it to take the lead, and its ongoing innovation and this effort to continually offer customers more service options may keep it there.

The main risk

It's no surprise that all of this has resulted in soaring earnings -- rising in the double- and triple-digit percentages -- and high profitability on sales. Nvidia has maintained gross margin exceeding 70% during most quarters, only declining to 60% in the recent quarter due to a charge linked to lost sales in China. This leads me to the main risk to Nvidia right now, and that is its presence in that particular market, one that made up 13% of sales last year.

The U.S. has imposed controls on exports of chips to China, blocking Nvidia's access to that market. The move prompted Nvidia to remove China from its sales forecasts due to being unable to predict what might happen. Nvidia surely would see higher growth if it could sell chips to China, but even without that market, growth is solid. It's important to remember that U.S. customers actually make up nearly half of Nvidia's total sales. Even in the worst scenario -- zero sales in China -- Nvidia's AI growth story remains bright.

Is Nvidia stock a buy now?

Even with growth going strong and the future looking bright, investors might wonder if buying Nvidia now, at a new high, is a good idea. The stock trades for 35 times forward earnings estimates, higher than a few weeks ago, but lower than a peak of more than 50 just a few months ago.

Considering Nvidia's earnings track record, market position, and future prospects, this looks like a reasonable price -- even if it's not at the dirt cheap levels of a few weeks ago. Of course, stocks rarely rise in one straight line, so there very well could be a dip in the weeks or months to come, offering an even more enticing entry point. But it's very difficult to time the market and get in at any stock's lowest point.

It's a better idea to buy at a reasonable price and hold on for the long term. And here's why: Nvidia's gains or losses over a period of weeks or one quarter, for example, won't make much of a difference in your returns if you hold onto the stock for several years. That's why you don't necessarily have to worry about buying at the high when you're a long-term investor, as long as the stock's valuation is fair. That's the case of top AI stock Nvidia right now, making it a buy -- even at the high.