Nvidia (NVDA -1.99%) has been one of the hottest stocks on the market this year. Even if it has experienced some highs and lows during that period, it's still up an impressive 80% for far in 2024.

But that's past performance, and investors want to know where Nvidia is headed to from here. However, predicting where a stock is going in two or three months can be tricky and can be affected by external events like the Federal Reserve's interest rate policy.

So instead, let's focus on where Nvidia may be in five years, taking a long-term view that focuses on how the business executes rather than short-term market sentiment.

Nvidia's GPUs are in high demand

Nvidia's incredible rise can be easily tied to one trend -- the rise of artificial intelligence (AI). Creating AI models requires an incredible amount of computing power. But that's where Nvidia's GPUs come in. GPUs, or graphics processing units, allow many computations to occur in parallel, which is useful for AI model training. Furthermore, when companies buy GPUs, they don't just buy one or two; they buy them by the hundreds or thousands and connect them to a server to create an incredibly powerful computer.

These GPUs aren't cheap, either. Nvidia's current flagship GPU, the H100, costs around $30,000 apiece. So, with companies buying truckloads of GPUs at a time, Nvidia is seeing a massive benefit.

But the question many investors have is, "When will this end?" While I don't have the answer, I can tell you that GPUs don't last forever. GPU companies like Nvidia are always innovating, and in a few years, the GPUs that are cutting edge now will be slower and less efficient than the newer ones available. This will drive another upgrade cycle, and with Nvidia's GPUs being the most commonly used right now, there will be switching costs if customers decide to go with competitors' products.

In 2022, UptimeInstitute found that 33% of organizations surveyed refreshed their servers every five years. That's up from 31% in 2020 and 20% in 2015. This time lengthening shows that upgrading isn't as beneficial as it was in the past, which could elongate the refresh cycle.

Still, with all of the innovation being driven by AI demand, this refresh cycle may be shortened due to the immense development of GPUs dedicated to AI models.

The stock is expensive, but for a good reason

But does all of this create an investible stock? It's no secret that Nvidia's stock has gotten expensive, and I'm not talking about a dollar figure (although it's nearing the $1,000 mark, which could indicate a stock split is coming). Instead, I'll use an earnings metric to value the company to know how expensive the stock is.

Because Nvidia is a rapidly changing business, using trailing earnings in the more traditional price-to-earnings (P/E) ratio isn't useful. Instead, I'll use forward earnings projections (which utilize analyst projections over the next 12 months) to value the company. While this method has its pitfalls, it is the best method investors have for analyzing Nvidia's stock.

NVDA PE Ratio (Forward) Chart

NVDA PE Ratio (Forward) data by YCharts

At 35 times forward earnings, Nvidia is not cheap. Compared to the S&P 500 index -- which trades at 21 times forward earnings, giving a good average of the entire stock market -- Nvidia has a hefty premium attached to its stock.

But very few stocks in the S&P 500 are projected to grow revenue at an 80% pace in their current fiscal year. Beyond that, the GPU market is also slated to grow, with Precedence Research estimating the GPU market could be worth nearly $800 billion by 2032.

With Nvidia's stronghold on the market and its $61 billion revenue mark last fiscal year, there's still plenty of room for growth. As a result, I think Nvidia is a stock that can continue moving higher over the next five years. While it's expensive now, investors can still get in on the stock and make money if they anticipate holding on for the next five years, even if Nvidia dips due to a spending drawdown.