NVIDIA (NVDA 2.24%) stock has returned a whopping 1,730% over the five-year period through Sept. 17 -- nearly 20 times the S&P 500's 88.7% return!

The graphics processing unit (GPU) specialist's return also sprints by those of its main competitors, including Advanced Micro Devices (AMD 0.04%), or AMD, which has returned 749%; and Intel (INTC -0.93%) and Qualcomm (QCOM -1.16%), which have returned 126% and 26.5%, respectively, over this period. 

With this superb long-term performance, many investors are likely wondering if it's too late to buy NVIDIA stock. My opinion is no, it's not. 

NVIDIA sports many strong metrics, but there's one key standout metric that seems to fly somewhat under many investors' radars: profit margin. This metric reflects both NVIDIA's incredible competitive advantage in its core markets, and suggests that its stock is poised to keep outperforming. 

Human profit on blue circuit board background -- concept for artificial intelligence.

Image source: Getty Images.

NVIDIA's profit margin has expanded significantly since 2016 

NVIDIA's profit margin (which is the percentage of its revenue that trickles down to its net income, or earnings) has been expanding significantly over the last few years. 

Since going public in 1999 through to 2015, the company's profit margin largely hovered in the 11% to 13% range, though it did fall into the single-digits and even into negative territory at times, and briefly lifted above 15% a couple of times. Then, in 2016, it blasted off, and it's now about triple what it was just a few years ago. 

NVDA Profit Margin (TTM) Chart

Data by YCharts.

The primary reason for this phenomenal increase can be summed up in two words: artificial intelligence (AI). In recent years, NVIDIA has transformed itself from a company that was "just" a dominant maker of graphics cards for computer gamers and professional designers to a company that's also a major player in AI. Its GPUs have emerged as the gold standard in AI training for data-center applications. This "top dog" position in a fast-growing market surely gives NVIDIA considerable pricing power, which is helping increase its overall profitability. Moreover, while it's still early in the game, AI also plays a starring role in its smaller auto business, which is focused on making products for the burgeoning self-driving vehicle market. 

The crypto boom helped profitability, but NVIDIA doesn't need this market

NVIDIA's profit margin did get a boost in 2017 and into the first quarter of 2018 from the soaring cryptocurrency market. (The company's GPUs are great at "mining" select cryptocurrencies, such as Ethereum.) We can't quantify this boost, but NVIDIA's top management has said that last year's rocketing crypto prices helped gross margin -- and, all other things being equal, a tailwind to gross margin will flow through to profit margin. 

That said, the following chart should dispel any notion that the crypto market is largely responsible for the company's increase in profit margin in recent years.

NVDA Profit Margin (Quarterly) Chart

Data by YCharts.

In its most recent quarter, the second quarter of fiscal 2019, NVIDIA's sales of its application-specific boards for crypto mining declined significantly because crypto prices crashed this year relative to last year. Those sales were negligible, accounting for just 0.6% of the company's total revenue, down from about 9% of total revenue in the first quarter. But, as you can see in the chart, the company's profit margin in the second quarter was still powerful, at 35.25%. Granted, that's down a bit from the peaks of the prior two quarters, but it's still the company's third best quarterly profit margin ever.

NVIDIA is the profit margin king

In addition to expanding in recent years, NVIDIA's profit margin is significantly higher than those of its main competitors. The company is involved in several markets, so it has many competitors, including the following three chipmakers: AMD (gaming), Intel (data center and driverless vehicles), and Qualcomm (driverless vehicles).

NVDA Profit Margin (TTM) Chart

Data by YCharts.

Given that NVIDIA's data center is the fastest growing of its four target market platform and that the company is focused on launching value-added platforms across its markets, its profit margin could continue to expand.