We hear a lot about how Americans on the whole aren't saving adequately for retirement, but clearly, there are plenty of outliers. In fact, the number of workers with $1 million or more in their 401(k) plans jumped to 157,000 at the end of this year's first quarter, according to Fidelity. That's a 45% increase from one year prior.

Of course, there are certain factors that fueled this accumulation of wealth. For one thing, the stock market had a killer 2017, which no doubt boosted balances hovering near the $1 million mark. Furthermore, Fidelity reports that many of the aforementioned 401(k) millionaires have been saving for a solid 30 years.

Man counting 100-dollar bills

Image source: Getty Images.

Still, it just goes to show that with a nice amount of effort, it's possible to amass $1 million and retire comfortably as a result. If that's the sort of goal you have in mind, here's how to get there.

1. Start saving early in your career

Many younger workers think of retirement as a far-off milestone that doesn't demand their immediate attention. But the fact of the matter is that the longer you give yourself to save for the future, the greater your chances of accumulating $1 million -- or whatever personal goal you have in mind.

Currently, you're allowed to contribute up to $18,500 a year to your 401(k) if you're under 50, or $24,500 if you're 50 or older. Most people, however, can't afford to part with anywhere close to that amount of money each year. But if you start saving early enough in your career, you can get away with setting aside much less month after month. Check out the following table, which shows what a modest $300 monthly contribution might grow into depending on the length of your savings window:

If You Start Saving $300 a Month at Age:

Here's What You'll Have by Age 70 (Assumes an 8% Average Annual Return):

25

$1.39 million

30

$932,000

35

$620,000

40

$408,000

45

$263,000

50

$165,000

55

$98,000

Table and calculations by author.

As you can see, if you commit to saving for the bulk of your career, you can turn a series of $300 monthly contributions into well over $1 million. Even if you miss the boat early on and don't start saving for almost a decade, you can still get pretty close. But the longer you wait, the more money you'll need to part with each month to have a shot at that $1 million -- and the more you risk coming up short when retirement rolls around.

2. Take full advantage of your employer match

If you're lucky enough to have a 401(k), you probably have a chance to get your hands on some free money for it. That's because an estimated 92% of companies that sponsor 401(k)s are willing to match employee contributions to some degree.

The problem? Roughly 25% of workers don't contribute enough to snag that match, thereby leaving a cumulative $24 billion on the table in unclaimed 401(k) dollars. On an individual level, that translates into $1,336 of lost money each year.

If you're serious about reaching millionaire status in your 401(k), you must make a point of putting in enough money each year to claim your employer matching dollars in full. Remember, too, that when you pass up any amount of free money each year, it's not just that principal you're giving up; you're also denying yourself its associated growth.

Imagine you forgo $1,336 a year over a 10-year period because you don't contribute enough to get your match, and then retire 20 years after that point. All told, you'll have missed out on over $90,000 when we factor in potential earnings on that lost money (assuming an 8% average yearly return on your investments).

3. Invest your savings wisely

You may have noticed by now that we've applied an 8% average return on investment to our different calculations so far. The reason for that 8% is that it's just a bit below the stock market's average, which means it's a pretty fair benchmark for projecting returns. But what happens when you shy away from stocks and invest more conservatively instead? It's simple: You lower your chances of retiring a millionaire.

Imagine you're able to sock away $300 a month over a 45-year period, only you play it safe and snag an average annual 4% return instead of 8%. In that case, you'd be looking at an ending balance of $436,000, which is a lot less than $1.39 million. Though stock investments do carry some risk, if you have a 10-year window or longer before retirement, you'd be wise to put your money there. Not only will you have a decent amount of time to ride out the market's ups and downs, but you'll also most likely score higher returns that do the trick of growing your wealth.

Retiring with $1 million or more often boils down to saving consistently and making smart investment decisions. Cover yourself in both regards, and if all goes well, you'll be on your way to joining the ranks of the proud 401(k) millionaires who get to look forward to retirement.