The secret to building wealth for retirement is a simple truth --some may even call it a "hack." You need your money to work for you, not against you. Carrying a balance on your credit card destroys wealth because you're paying high interest on that debt.

Building wealth happens when you invest your money and let compounding work in your favor. This simple concept has created millions of millionaires and will create many more. But investing is such a broad term, and there are many stocks, funds, and other places to put your money.

Don't worry. Here is the best way to compound your retirement nest egg.

Meet the S&P 500

Every long-term investor should consider starting their journey to a wealthy retirement with an investment in the S&P 500 (^GSPC 1.37%). You may have heard it mentioned on television or read about it in the newspaper, often referring to the stock market. The S&P 500 is an index of 500 prominent U.S. companies lumped together to represent the broader U.S. stock market. Their market cap determines each company's weight, so some represent more of the index than others.

For example, the top five companies in the S&P 500 combine for 24.67% of the index, nearly a quarter:

  1. Microsoft: 7.23%
  2. Apple: 5.90%
  3. Nvidia: 5.00%
  4. Amazon: 3.95%
  5. Meta Platforms: 2.59%

The companies that grow the largest float to the top, ensuring that the best performers always stand in front. This is an excellent way for investors to easily diversify their investments while letting the best stocks contribute more than the rest. When you invest in the S&P 500, you're investing in the best companies in the world's best economy. That's a great place to keep your money for the long term.

When volatility doesn't equal risk

The largest obstacle for many investors is the fear of losses. It's understandable. Nobody wants to work for years, scrimping and saving a nest egg, only to lose it all in a market crash. On the other hand, you'll have difficulty building your nest egg if you don't invest. You've probably seen inflation raise the cost of living everywhere; you can't afford to park your money in a bank account until you retire.

It may not seem like it, but the S&P 500 is arguably your safest wealth-building tool. I don't want to mislead you, so I'll say this upfront: Stocks can be volatile. The market has crashed in the past, and there will be future market crashes. You can think of the stock market as a cycle of booms and busts. Nobody knows when the cycles will happen, so don't believe anyone who says they know.

The good news is that the S&P 500, introduced in 1957, has always rebounded and grown larger.

^SPX Chart

^SPX data by YCharts

A zig follows every zag. The market goes up as companies sell and earn more, and the U.S. consumer makes more and spends more. Roughly 68% of the U.S. economy comes from consumer spending. As long as the modern way of life continues, investors can feel confident in the long-term trajectory of U.S. stocks. Volatility does not necessarily equal risk.

Applying the Rule of 72

Let's circle back to compounding now. How can you figure out what you can expect from the stock market? Well, the year-to-year returns can be pretty wild. The S&P 500 could go down 20% one year and up 30% the next. But the math works out to an average of roughly 10% annually over many decades. You can use this number to apply the Rule of 72, a simple formula to determine how long an investment will take to double.

Based on this math, the S&P 500 should double every 7.2 years on average.

So, imagine you invest $10,000 in an S&P 500 index fund. You should have roughly $20,000 after seven years. That could be $40,000 by year 14 and $80,000 by year 21. That's eight times your initial investment in just over two decades. That's why investing as early as possible is so important -- compounding becomes more powerful the longer it goes on.

Have you already started investing? Great! Keep going. If you're just beginning, consider putting your money into an index fund that tracks the S&P 500 and let it marinate for as long as possible. Your future, wealthier self will thank you.