Last month, Nvidia (NVDA 0.62%) became the first company to be valued at more than $4 trillion, as artificial intelligence (AI) has become the future of technology. The stock is trading a tiny bit under its recent record high on Thursday morning, and investors may be wondering if the stock is too expensive to buy. A look at how Nvidia became the AI leader might give investors more comfort in buying shares now.

Image source: Nvidia.
It started with data center GPU sales
Nvidia stock does look relatively expensive right now. Its price-to-sales (P/S) ratio based on expected 2025 revenue is about 21.5. That's above its three-year average of 18.5, which itself is very high. But an elevated P/S valuation has thus far proven justified. That's because sales have soared exponentially, led by Nvidia's data center segment.

Data source: Nvidia. Chart by author.
Nvidia's stock price has risen along with those sales, and there looks to be more room to run for both. Data center sales continue to increase every quarter, and the company's next-generation graphics processing unit (GPU) Rubin architecture is slated for release in 2026.
What's next beyond data centers
Nvidia has growth potential beyond data centers, too. Revenue from its automotive and robotics segment is also growing quickly, as shown below. It could have a longer runway for growth, too.

Data source: Nvidia. Chart by author.
Companies around the world are working to make driverless cars a reality. There could be a massive market for self-driving ridesharing and taxi services. Nvidia is partnering with legacy automakers as well as start-ups like autonomous driving company Nuro to advance AI-driven autonomous vehicles.
Beyond automotive applications, robotics could also become a large market as companies seek more efficient and safer ways to operate. Nvidia's future looks bright. The stock may look expensive now, but that can quickly change as the business soars.