Anyone can turn $500 into $500,000 -- if you have the time and the patience.

Don't believe it? Read further to discover the secrets of how consistent savings and long-term stock market returns can add up to a half-million bucks.

A jar full of $100 bills on a table.

Image source: Getty Images.

Getting started

First things first: In order to grow a nest egg, you must save. So, let's imagine a hypothetical investor who has it within their means to save $500 per month.

Next, let's imagine a base case where our hypothetical investor poured this $500 per month into a five-year certificate of deposit (CD) that paid 5% annually. Furthermore, let's also assume that our hypothetical investor could roll their nest egg every five years into a new CD with the same 5% annual rate.

Time Period Value of Nest Egg
Year 5 $33,907
Year 10 $77,182
Year 20 $202,902
Year 25 $292,867

Calculations by author.

As you can see, after five years, our investor's nest egg will have grown to nearly $34,000. In 10 years, it would be worth more than $77,000. And in 25 years, their nest egg will have grown to almost $300,000.

Not bad. But the stock market can put those 5% annual returns to shame. Here's how.

How to use a basic index fund to grow a nest egg

Let's start by identifying a simple, well-known index exchange-traded fund. I like the Invesco QQQ Trust (QQQ -0.81%). It's chock-full of technology stocks like Microsoft, Apple and Nvidia. It also offers some diversification. It has holdings in PepsiCo, Amgen, Costco Wholesale, Starbucks, and CSX, to name just a few.

At any rate, what's of particular interest is the fund's annual returns. Because over the last 10 years, this fund has generated a compound annual growth rate (CAGR) of 17.2%.

QQQ Total Return Level Chart

QQQ Total Return Level data by YCharts

Granted, the last 10 years have been excellent for the stock market -- and for tech stocks in particular. So, if we extend the performance window back to 1999, giving us 25 years of data, the fund's CAGR slips to 9.1%.

QQQ Total Return Level Chart

QQQ Total Return Level data by YCharts

To be conservative, let's use this lower CAGR of 9.1% and see how 25 years of investing could help our hypothetical investor turn $500 into $500,000.

How stock market returns measure up

By applying a 9.1% CAGR to the nest egg, we begin to see how a seemingly small change in annual return can truly ramp up investment returns.

Time Period Value of Nest Egg (9.1% CAGR) Value of Nest Egg (5% CAGR)
Year 5 $37,457 $33,907
Year 10 $95,354 $77,182
Year 20 $323,171 $202,902
Year 25 $536,981 $292,867

Calculations by author.

At first, the difference is small -- almost imperceptible. Five years in, the investment nest egg has only generated about $3,500 more.

However, after 10 years, the difference is more apparent. By then, there is an almost $20,000 difference between the two nest eggs.

By year 20, there's no mistaking the point -- a larger annual return changes everything. After 25 years, the investment nest egg is 83% larger than the money market nest egg.

In summary, the basic index fund outperformed CDs by nearly $250,000. But that's not all. Remember, in this scenario, we've used a very conservative growth rate for the index (9.2%). We've also used a very optimistic interest rate for CDs (5%). Over many periods of time, the stock market has outperformed CDs by an even greater margin.

That's why investing in a simple index-tracking ETF is one of the best ways to grow wealth. And it's one way to turn $500 a month into $500,000.