Many people think the only way to be a self-made millionaires is to be a professional athlete, entertainer, or entrepreneur. But an average company employee can build a seven-figure nest egg starting with nothing. The key is time, and taking full advantage of all the retirement savings options offered to you by many major corporations, including company-matched contributions.

For most of us, this vehicle is a 401(k) plan.

But how long will it take a 401(k) to reach the million-dollar mark, and how much cash will need to be chipped in in the meantime? Here's a rough idea.

Crunching the numbers

Take any theoretical projection like this one with a grain of salt. This back-of-the-envelope math is only meant to give you a broad idea of what it takes; you'll want to adjust and adapt as necessary.

The good news either way is, becoming a millionaire using only a tax-deferring 401(k) retirement account isn't nearly as out of reach as too many people suspect.

For the purpose of this exercise we have to make two key assumptions. First, you're investing the entirety of your contributions in an index fund meant to mirror the performance of the S&P 500, which on average returns about 9% per year. The other key assumption? You're making this year's maximum 401(k) contribution of $20,500 every year from now until you reach $1 million. Neither of these assumptions is etched in stone, as sometimes the market dishes out gains far greater than 9%, while in other years it may lose ground. Maximum allowable contributions tend to increase over time.

A retired couple sitting on their porch.

Image source: Getty Images.

But using these assumptions, you'll reach $1 million in a little under 19 years. Of that amount, nearly $400,000 of it comes from your contributions. The remainder comes from returns on your contributed money.

If you can't come up with the full $20,500 worth of 2022 contributions, don't sweat it. Most people can't! Smaller amounts -- when deposited faithfully -- can still get you to the seven-figure end zone. It just takes a little more time. If you're able to earn 9% on a more manageable $10,000 worth of 401(k) contributions, you can get the job done in 26 years. Even at a more modest annual investment of $5,000, you can become a millionaire after 34 years of working.

As is the case with making the full $20,500 contribution, the bulk of the million-dollar nest egg resulting from these smaller annual investments still comes from the tax-deferred gains on contributions rather than the contributions themselves.

You can start with less than the max

There's no guarantee, though, that starting now will get you to $1 million in 2041. The market might hit a multi-year rough patch at the worst possible time. The maximum 401(k) contribution will certainly be raised in the future, and depending on your age or the type of plan your company sponsors, that $20,500 cap may or may not apply to you right now. And if you're like most corporate workers, you may not be able to max out your contribution now. As you earn raises and promotions, though, a maximum contribution could be possible in the future.

Also bear in mind that while $1 million is still a fairly tidy sum these days, it may not mean as much 20 years from now. You'll be paying taxes on any funds withdrawn from your retirement account when the time comes to start living on your savings, even though any growth of your portfolio is untaxed in the meantime.

In other words, there are a lot of factors to consider. Your retirement planning should be fluid.

More important than adapting and updating your plan over time, though, is getting started somewhere. Plant whatever seeds you can plant today. Even a relatively small contribution now is better than no contribution at all, since time ends up doing most of the heavy lifting for retirement savers.