You've likely heard stories about them. But you probably don't actually know anyone with a 401(k) that's worth $1 million or more. There's seemingly just not enough time -- or cash to contribute -- for most ordinary people to grow their work-based retirement nest egg into a seven-figure stash.

Believe it, though. While not common, there are 401(k) millionaires out there.

How did they do it? And can you do it, too?

The three-part answer to the first question awaits below. The answer to the latter question depends on how willing and able you are to do these same things for yourself.

1. 401(k) millionaires maxed out their contributions

As you may know, there are limits to how much of your salary you can pour into a 401(k) account. This year's cap stands at $23,000, up slightly from last year's limit of $22,500. This cap of course is now raised at relatively regular intervals.

But how much of their limit at the time did most 401(k) millionaires utilize while putting money in these accounts? In most cases, they made the maximum legal contribution they were allowed to make in any given year.

That's easier said than done, especially these days. Between life's ordinary expenses like food, housing, and taxes, there's just not always much money left over from the average individual's annual income of around $41,000 (according to the Census Bureau), or the country's typical household income of just a little over $75,000 per year. These folks still found a way to do it though, either by stretching their budgets, earning more work-based income, or a combination of both.

Even the self-made 401(k) millionaires who didn't max out their potential contribution each and every single year, at least did one thing. That is, at the very least they invested enough of their own income to receive all of their employer's matching contribution. The typical minimum company-based contribution is on the order of 3%, although mutual fund company Fidelity says most employers will pony up between 4% and 5% of workers' salaries as matching 401(k) contributions.

Regardless of the size of the company's contribution, this is simply free money that participants can put to work for the benefit of the employee as soon as it's deposited into the accounts. That's a no-brainer investment in and of itself.

2. 401(k) millionaires participated for a long, long time

While it makes sense that making bigger contributions now leads to bigger 401(k) account balances later, that's only half the equation. The other half is time. Namely, the longer you allow your contributions to grow, the greater the overall net impact is down the road. Indeed, there comes a time when the account's yearly investment gains are bigger than any single year's contribution.

The graphic below illustrates the idea. Assuming regular net contributions of $10,000 per year invested in an S&P 500 index fund that returns an average of 10% per year, after 30 years this account would be worth a little over $1.8 million. Not bad.

Thanks to compounding, most of any retirement account's gains materialize in the last one-third of its beginning-to-end growth.

Calculations by author via Calculator.net. Chart by author.

Now take a closer look at what happens around the eighth year of this hypothetical 30-year stretch. That's when the account starts logging average investment gains of even more than the yearly $10,000 contribution. In a similar vein, notice that the vast majority of this account's total value didn't materialize until the last one-third of the three-decade time frame.

The point is time -- a lot of it -- did most of the heavy lifting for folks who grew their 401(k) accounts into million-dollar nest eggs.

3. 401(k) millionaires (probably) owned a ton of stock in their employer

Odds are good that any average-income worker who became a 401(k) millionaire very likely did so because they happened to be in the right place at the right time. That is, owning lots of shares of their employer's stock in their 401(k) in front of a rewarding high-growth period for that particular company.

That's the market's go-go period between the late 1990s and early 2000s, by the way, when the capital markets were eager to reward growth being driven by many companies in a wide range of business sectors. Names like Lowe's and Netflix come to mind. Who would have thought a chain of hardware stores and a quirky little experiment in internet-delivered video could become such a big part of the nation's cultural landscape?

In other words, these people got a little lucky, not being punished for not fully diversifying their investments. In retrospect, we now know it's not the ideal way of building 401(k) wealth. Just ask the folks working for General Electric back in 2017 and 2018, when the company's stock was routed after several liquidity problems finally came to a head. GE stock accounted for about one-third of its employees' collective 401(k) balances.

The good news is it's not a terribly common scenario any longer. A review done by fund company Vanguard indicates that as of 2022 only around 8% of 401(k) plan participants held shares of their company's stock in their retirement accounts. Moreover, only about 3% of these 401(k) plan participants allocated more than 20% of their portfolio to shares of their employer. All those figures are down since the early 2000s, too.

Still, know that most 401(k) millionaires likely reached the seven-figure milestone several years ago before the world started coming to its diversification senses.

Discouraged? Don't be. It's still possible to grow your 401(k) account to a value of more than $1 million even without an oversized stake in the shrinking number of mega-opportunities that were widely available two and three decades back. You'll simply need to rely less on luck and more on smart management of your portfolio's holdings to make it happen.

Just do what you can when you can where you can

But you don't have 30 years -- nor several thousand extra dollars per year -- to contribute to a 401(k)? That's OK. Most people don't. It doesn't really matter. Even if you're miles away from making what seems like a meaningful contribution or only have a few years before you retire, doing something is better than doing nothing. You may also find that once you get started it becomes easier than you initially expected to save and invest money in a retirement fund. You may even end up getting closer to becoming a millionaire than you ever thought possible.

And that's something of a fourth, unspoken and underappreciated secret of 401(k) millionaires. While they likely expected to do well enough for themselves, it's unlikely that many of them truly expected to grow these accounts into seven-figure stashes. The odds are better that it just sort of happened because they stuck with the process of saving and investing.