If you want to invest in the stock market but aren't sure which companies to put into your portfolio, tracking the S&P 500 index can be a safe option to consider. The index is made up of the top stocks on U.S. exchanges, and it's a big deal when companies are added to it, because it signifies that they have built a strong business. At the same time, stocks that aren't doing well are dropped from the index, ensuring that it only contains the best of the best.

By tracking the index, you can benefit from the overall market's long-term growth. And doing so can ensure that you are minimizing your risk while still holding quality stocks. It's a no-brainer way to invest in the market, and it can be suitable for all types of investors.

The market will have bad years, but over the long term, by mirroring the S&P 500 index, you can achieve some significant returns. Below, I'll show you how a $30,000 investment might grow over the long term, and whether it can potentially be enough to set you up for at least $1 million by retirement, assuming you have at least 30 investing years left.

Two surprised people looking at a laptop.

Image source: Getty Images.

A no-nonsense ETF that gives you exposure to the S&P 500

If you want an easy way to track the S&P 500 index, there are many exchange-traded funds (ETFs) to accomplish that. A popular option is the SPDR S&P 500 ETF (SPY 0.04%). It's appealing to investors because it comes with low fees: Its expense ratio is just 0.09%.

Putting $30,000 into individual stocks can be difficult if you want to ensure your risk level isn't too high. But with this ETF, you can invest a large lump sum and know that your money will be safe because of the ETF's vast diversification. Even if the index does struggle in a given year, you can be confident that it will bounce back over the long run.

How much of a return can you expect from the S&P 500 fund?

The key thing when investing in a diversified fund like the SPDR S&P 500 ETF is to just let the money sit there and grow. While you can definitely add to your position over time, simply leaving it there can help you resist the temptation to put that money into other investments that may not prove to be as stable or reliable in the long run. And by letting that money sit and experience compound growth over the years, you can end up with a significant balance at the end.

Right now, the S&P 500 has been red hot by ihistorical standards: It has more than doubled in just five years. Its long-run average is about 10% a year, which would mean you would expect it to double after a little more than seven years.

That's something to consider: You are investing at a time when the index is at record levels, which could mean a slowdown is overdue and it will average a somewhat lower return from here on out.

I have created the table below to show what a $30,000 investment in the SPDR ETF might become after 30 years, assuming annual growth between 8% and 10% to factor in the possibility of lower-than-typical returns in the future.

Years 8% Growth 9% Growth 10% Growth
30 $301,880 $398,030 $523,482
31 $326,030 $433,853 $575,830
32 $352,112 $472,900 $633,413
33 $380,281 $515,461 $696,755
34 $410,704 $561,852 $766,430
35 $443,560 $612,419 $843,073
36 $479,045 $667,537 $927,380
37 $517,369 $727,615 $1,020,118
38 $558,758 $793,100 $1,122,130
39 $603,459 $864,479 $1,234,343
40 $651,736 $942,283 $1,357,778

Table and calculations by author.

A $30,000 investment isn't likely to grow to $1 million, even after 40 years, unless the long-run annual growth rate is about 10%, which may be unlikely. But one thing is for sure: You can still end up with a significant balance.

What this table tells you is that if you want to be on track for generating a $1 million portfolio by retirement, you will probably want to aim to invest more than $30,000. Setting realistic expectations can be key for investing, to ensure that you don't set yourself for disappointment later on and end up falling short of your goals.