Investing in a 401(k) is one of the best (and easiest) ways to save for retirement. Not only do many plans offer employer matching contributions, but 401(k)s also have much higher annual contribution limits than IRAs -- in 2020, investors can save $19,500 per year in their 401(k), compared to just $6,500 per year in an IRA.

However, one downside to the 401(k) is that your account is tied to your employer. That leads to the question of what you should do with your retirement fund when you leave your job, since most workers will have multiple jobs over their lifetime. You have several options for what you can do with your 401(k) when you leave your employer, and more than a third of workers are making the wrong choice.

Young man with money flying out of his wallet

Image source: Getty Images.

Too many workers are cashing out their 401(k)s

When you leave a job, there are a few things you can do with your 401(k): You can keep the money where it is and let it grow, roll it over to a new retirement account, or cash it out. Of these three options, the most financially harmful choice is to cash out your 401(k) -- and yet that's the option approximately 36% of Americans choose, according to a survey from Fidelity Investments.

The percentage of workers cashing out their 401(k) when they leave a job is highest among those age 20 to 29, according to the survey, which may be because younger workers typically don't have as much saved as those who have been building their retirement funds for decades. If you only have a few thousand dollars in your 401(k), it may be tempting to cash out when you leave a job. However, no matter how much you have stashed away, you may be inadvertently causing long-term damage to your finances by pulling your money out of your 401(k).

To grow a robust and healthy nest egg, one of the best things you can do is start saving early and let your money sit untouched in your retirement fund for as long as possible. Thanks to compound interest, the longer your money has to grow, the bigger investment gains you'll see. So when you withdraw your cash from your 401(k), you're essentially starting back at square one. Even if you reinvest some of that money later, you're still missing out on valuable time to let your money grow.

In addition, there are some more immediate risks of cashing out your retirement fund. When you withdraw money from your 401(k) before age 59 1/2, you'll be hit with a 10% penalty, and you'll also have to pay income taxes on the amount you withdraw. So not only could you be missing out on thousands of dollars in potential long-term growth by cashing out your 401(k), but you may need to immediately forfeit a chunk of your savings to Uncle Sam, too.

What should you do instead of cashing out?

When you leave a job and need to figure out what to do with your 401(k), you have a few options. First, you could simply leave your money where it is. You won't be able to continue contributing to your old 401(k) after you leave your job, but your investments will continue to grow tax-deferred. And while that money is growing, you can open a new 401(k) at your new employer and start saving there.

Another option is to roll your money over into an IRA. The advantage of this option is that IRAs offer far more investment options than the average 401(k), so you'll have more control over how your portfolio is allocated. You can also continue contributing to your IRA even if you open another 401(k) with your new employer. That's a big advantage for super savers, because if you max out your 401(k), you can continue investing the rest of your cash in your IRA. The downside, though, is that you'll have two accounts to keep track of, which can sometimes be a burden.

A third option is to transfer the money in your old 401(k) to your new 401(k) with your new employer. Many companies offer this benefit, and it can be a smart move if your new employer offers better investment choices than your previous employer. This option allows you to have all of your investments in one place while still investing your cash wisely.

Choosing the right option for you

When deciding which option is best for you, one of the most important factors to consider is how much you're paying in fees. All types of retirement accounts charge fees, and the average 401(k) charges a fee of 1% of total assets managed, according to a study from the Center for American Progress. So if you have, say, $100,000 in your account, that means $1,000 per year is going to fees.

If your old 401(k) charges higher-than-average fees, you may be better off moving your money out of that account. Or if your 401(k) at your new employer charges high fees, it may be wise to contribute enough to earn any matching contributions from your employer, then keep the rest of your cash in an IRA. On the other hand, if your new 401(k) offers reasonable fees, the best decision may be to store all of your investments in that account. High fees can take a big bite out of your savings, so read the fine print in your account statements or talk to your plan administrator to find out what you're paying.

Managing your 401(k) when you leave your job can be confusing, and it might be tempting to pull all of your savings out of your account when you go. However, that can have both short- and long-term consequences. By understanding all of your options, though, you can make the best decision for your financial situation.