If you've been hearing a lot about semiconductor company Nvidia (NVDA -0.36%) in recent months and you're not sure why, check out its returns in recent years:

Year

Return

2023

239%

2022

(50%)

2021

125%

2020

122%

2019

76%

2018

(31%)

2017

81%

2016

224%

Source: 1stock1.com.

Here's another table showing why tongues are wagging:

Period

Average annual return

Last 3 years

90%

Last 5 years

102%

Last 10 years

75%

Source: Morningstar.com.

See? Nvidia's performance has been phenomenal -- and, unsurprisingly, lots of people are kicking themselves, wishing they'd bought into the stock long ago. You may be one of those people, and if you are, take heart -- there's a decent chance you've been invested in Nvidia all along!

Surprise! You may own Nvidia!

So, how could you be an investor in Nvidia without even realizing it? Well, if you own shares of an S&P 500 index fund, such as the Vanguard S&P 500 ETF (VOO -0.39%), the SPDR S&P 500 ETF (SPY -0.39%), or the Vanguard 500 Index Investor (VFINX -0.72%), you're a (small) co-owner of Nvidia. (Note that ETFs are exchange-traded funds, mutual-fund-like securities that trade like stocks.)

Remember that S&P 500 index funds aim to hold the same stocks in the S&P 500 index in the same proportions, thereby achieving pretty much the same returns (less fees, which tend to be minuscule). The SPDR S&P 500 ETF, for example, recently sported these top holdings:

Stock

Weight in fund

Microsoft

7.19%

Nvidia

7.01%

Apple

6.61%

Amazon.com

3.69%

Meta Platforms

2.40%

Source: Morningstar.com.

You'll see very similar weightings for most other S&P 500 index funds. So if you had, say, $10,000 invested in the fund above, you'd have $701 invested in Nvidia -- when its weighting was 7.01%. Nvidia recently became a $3 trillion company, so of course, it will be very influential in the index and in funds that track the index. Smaller companies in the S&P 500, such as Kraft Heinz, with a recent market value of $40 billion, recently had weightings well below 0.50%.

Weightings change over time because the S&P 500 index is a market-cap-weighted index. That means the companies with the biggest market values carry the biggest weight. So, as Nvidia's market value rises or falls, its weighting will similarly rise or fall, though not necessarily immediately.

One factor driving Nvidia's shares up recently was its 10-for-1 stock split that occurred in early June. Stock splits don't really mean much, though. Other bulls are excited about Nvidia's chips that can power data centers, which are in greater demand due to growing use for artificial intelligence (AI).

So if you (very sensibly) own shares of an S&P 500 index fund, you're an Nvidia shareholder, too. That's also true for many other index funds, actively managed mutual funds and ETFs. The Vanguard Information Technology ETF (VGT -0.04%) recently had 14% of its assets in Nvidia. The Technology Select Sector SPDR ETF (XLK -0.05%) had a 6% weighting for Nvidia, and the iShares Semiconductor ETF (SOXX 1.01%) had an 11% weighting.

Even pension funds and other institutional portfolios may own Nvidia shares, and you could be an owner that way, too.

If you don't own Nvidia...

But what if you're not an Nvidia shareholder? Are you out of luck? Not necessarily. You could still buy shares of the stock. But know that it carries a fairly steep valuation, and in some eyes, it's "priced for perfection," meaning that if it slips or disappoints, its stock could be punished. This can be less of an issue if you plan to hold your shares for many years.

So do some research before buying, and if you're on the fence about it, perhaps just add the stock to your watch list or buy into it incrementally over time. Alternatively, you might invest in one or more ETFs that include Nvidia among their holdings -- though even ETFs can decline in value if their holdings do.

One way or another, you can be an Nvidia shareholder -- sharing in the company's long-term success (or disappointments).