You'll need income outside of Social Security to manage your living costs during retirement. That's where your personal savings come in. And if you have access to a 401(k) plan, you have a prime opportunity to grow a lot of wealth.

The great thing about 401(k) plans is that they come with generous annual contribution limits -- $20,500 for workers under 50, and $27,000 for those aged 50 and over. Furthermore, many 401(k)s include an employer matching incentive which doesn't count toward your annual contribution limit, so that's an extra opportunity to sock funds away for the future.

But the money you put into your 401(k) shouldn't sit there in cash for years on end. If you go that route, you're not going to enjoy much growth.

A smiling person at a laptop.

Image source: Getty Images.

Rather, your 401(k) needs to be invested in a way that will outpace inflation. That way, you'll be more likely to avoid an income shortfall during retirement.

Now the tricky thing about 401(k)s is that unlike IRAs, you generally can't invest your savings in individual stocks. That could limit your ability to stick to your preferred strategy. Compounding that challenge is that many 401(k)s funds are actively managed, and therefore come with expensive fees -- fees that could eat away at your returns over time.

But there's one specific type of fund you'll commonly find with 401(k)s that's a great choice for long-term investing. And it shouldn't cost you a lot of money in fees, either.

Load up on index funds

Most 401(k)s plans offer a choice of broad market index funds. And it pays to consider investing your money there.

Index funds are passively managed, and their goal is to match the performance of the different benchmarks they're tied to. If you put your money into an S&P 500 index fund, for example, the goal of that fund will be to perform as well as the S&P 500 itself.

The upside of investing in index funds is twofold. First, you get instant diversification for your savings without having to do a ton of research. Secondly, you'll generally avoid the hefty fees actively managed mutual funds are known to charge. Since index funds don't employ fund managers to hand-pick stocks, they're able to keep their expenses low -- and therefore don't pass high fees onto investors.

How well might you do with index funds?

Let's imagine you're able to contribute $600 a month to your 401(k) plan over a 35-year period. Let's also assume you go heavy on index funds that generate an average annual 8% return, which is a bit below the broad market's average. At that point, you'll be looking at a 401(k) worth $1.24 million. Not too shabby.

That also assumes you can't get closer to maxing out your 401(k). The more you contribute, the higher a balance you're likely to accrue.

Of course, you don't have to limit yourself to index funds only when investing your 401(k). But if you want to avoid high fees without compromising on performance, then index funds could be your best bet.