How big a nest egg will you need for retirement? Well, the answer will be different for different people, with much depending on where you live, your expenses and spending habits, your health, and your expected longevity. When thinking about how much to save for retirement, many people shoot for a million dollars.

So let's take a look at how you might amass a million bucks. Let's also assume that you already have a head start, with, say, $100,000 socked away.

Someone is smiling and pointing at an upward-going graph.

Image source: Getty Images.

1. Index funds

The best one-size-fits-almost-all suggestion is to invest most or all of your long-term dollars in the stock market, via a simple, low-fee stock index fund -- in mutual fund or exchange-traded fund (ETF) form. Each will aim to deliver roughly the same return as a specified index of stocks.

The stock market has averaged roughly 10% annual growth over many decades. You're no guaranteed such a return over your particular investing period, though. You might do better or worse. So here's a look at how much you might amass at an average annual growth rate of 8%, investing $6,000 or $12,000 annually:

Growing at 8% For:

$6,000 Invested Annually

$12,000 Invested Annually

5 years

$38,016

$76,032

10 years

$93,873

$187,746

15 years

$175,946

$351,892

20 years

$296,538

$593,076

25 years

$473,726

$947,452

30 years

$734,075

$1,468,150

35 years

$1,116,613

$2,233,226

40 years

$1,678,686

$3,357,372

Data source: author.

See? Given enough time and assuming you persevere and stick to the plan, you can get to a million dollars in around 26 years. And that's assuming you start with nothing. Here's what happens if you start with $100,000 invested:

Starting With $100,000 and Growing at 8% For:

$6,000 Invested Annually

$12,000 Invested Annually

5 years

$184,948

$222,964

10 years

$309,765

$403,638

15 years

$493,163

$669,108

20 years

$762,633

$1,059,171

25 years

$1,158,574

$1,632,301

30 years

$1,740,341

$2,474,416

35 years

$2,595,147

$3,711,760

40 years

$3,851,138

$5,529,825

Data source: author.

Now you might become a millionaire in just 20 years or so. Of course, invest more, especially early on, and you can amass even more. Never discount index funds -- because index funds can be all you need to get rich.

2. Dividend-paying stocks

If you're willing to learn more and expend more effort, you might add some individual stocks to your portfolio, and dividend-paying stocks are well worth your consideration -- because healthy and growing dividend payers will tend to keep plunking cash into your account no matter what the economy is doing -- and they tend to boost their payouts over time, too -- often outpacing inflation.

If you have, say, $300,000 in dividend-paying stocks with an overall average dividend yield of 4%, you're set to receive $12,000 annually in dividends alone -- and, ideally, stock price appreciation over time, as well.

3. Growth stocks

Growth stocks -- tied to companies that are growing at a faster-than-average rate -- are another potential road to riches, as long as you don't under-diversify and invest in only a few overvalued stocks that head south. Growth investors will often end up with a bunch of stocks that perform terrifically, along with some that implode. That's why you might spread your dollars across a bunch of them. Our Foolish investing philosophy suggests buying into around 25 or more companies and aiming to hang on to your shares for at least five years.

4. Value stocks

Then there are value stocks -- those that are trading for less than you think they're really, intrinsically, worth. They can also be growth stocks -- at various times, even growth stocks such as Amazon.com, Apple, and Facebook parent Meta Platforms have traded at appealing valuations.

The ranks of value investors include such investing greats as Warren Buffett, Tom Gayner, and Mohnish Pabrai, and one reason they're drawn to value investing is that it offers a margin of safety.

These are just some of many ways that you might get to a million dollars (or more!) before you retire.