Nvidia (NVDA -2.09%) has been the poster child for the stock market this year, skyrocketing to the top of highly valued stocks and becoming an iconic symbol of the artificial intelligence (AI) revolution.

If you were lucky enough to invest in its initial public offering (IPO) and still own your shares, you'd be one lucky investor. But it's not all luck. Holding for the long term, especially when markets crash or stocks otherwise drop, is an investing mindset, and if you can get into it, you might be onto the next Nvidia.

Stock splits + gains = incredible results

Nvidia went public in 1999 at $12 a share, but only became popular over the past two years or so. Its original graphics processing units (GPU) were primarily used in the gaming industry and largely unknown outside of the tech world.

Today, Nvidia is practically a household name. It's the main producer of the GPUs necessary for generative AI, and the company's stock has gained 730% over the past two years alone.

However, it was gaining well before that. Nvidia did two 2-for-1 stock splits right off the bat in 2000 and 2001. It did another one in 2006, and a 1.5-for-1 split in 2007. There was a 4-for-1 split in 2020 and, finally, a highly publicized 10-for-1 split this past June. If you bought one share at the company's IPO, you'd have 480 shares now.

At today's prices, 480 shares of Nvidia stock are worth $66,371. However, the company also pays a dividend. Inclusive of the dividend, you'd have $74,539.

But investors don't usually buy one share. If you'd invested as little as $100 at the company's IPO, you'd now have $379,000.