When you change jobs, you need to decide what to do with the money in your 401(k) plan. Should you leave it where it is or take it with you? Should you roll the money over into an IRA or into your new employer’s retirement plan?

As you consider your options, keep in mind that one of the greatest advantages of a 401(k) plan is that it allows you to save for retirement on a tax-deferred (or in the case of Roth accounts, potentially tax-free) basis. When changing jobs, it’s essential to consider the continued tax-deferral of these retirement funds, and, if possible, to avoid current taxes and penalties that can eat into the amount of money you’ve saved.

Take the money and run

When you leave your current employer, you can withdraw your 401(k) funds in a lump sum. To do this, simply instruct your 401(k) plan administrator to cut you a check. Then you’re free to do whatever you please with those funds. You can use them to meet expenses (e.g., medical bills, college tuition), put them toward a large purchase (e.g., a home or car), or invest them elsewhere.

While cashing out is certainly tempting, it’s almost never a good idea. Taking a lump sum distribution from your 401(k) can significantly reduce your retirement savings, and is generally not advisable unless you urgently need money and have no other alternatives. Not only will you miss out on the continued tax-deferral of your 401(k) funds, but you’ll also face an immediate tax bite.

First, you’ll have to pay federal (and possibly state) income tax on the money you withdraw (except for the amount of any after-tax contributions you’ve made). If the amount is large enough, you could even be pushed into a higher tax bracket for the year. If you’re under age 59½, you’ll generally have to pay a 10% premature distribution penalty tax in addition to regular income tax, unless you qualify for an exception. (For instance, you’re generally exempt from this penalty if you’re 55 or older when you leave your job.) And, because your employer is also required to withhold 20% of your distribution for federal taxes, the amount of cash you get may be significantly less than you expect.

If your 401(k) plan allows Roth contributions, qualified distributions of your Roth contributions and earnings will be free from federal income tax. If you receive a nonqualified distribution from a Roth 401(k) account, only the earnings (not your original Roth contributions) will be subject to income tax and potential early distribution penalties. (In general, a distribution is qualified if it is paid after you reach age 59½, become disabled, or die, and you have satisfied a five-year holding period.)

Leave the funds where they are

One option when you change jobs is simply to leave the funds in your old employer’s 401(k) plan where they will continue to grow tax deferred.

However, you may not always have this opportunity. If your vested 401(k) balance is $5,000 or less, your employer can require you to take your money out of the plan when you leave the company. (Your vested 401(k) balance consists of anything you’ve contributed to the plan, any employer contributions you have the right to receive, and any investment earnings on these contributions.) Your employer may also require that you withdraw your funds once you reach the plan’s normal retirement age.

Leaving your money in your old employer’s 401(k) plan may be a good idea if you’re happy with the investment alternatives offered or you need time to explore other options. You may also want to leave the funds where they are temporarily if your new employer offers a 401(k) plan but requires new employees to work for the company for a certain length of time before allowing them to participate. When the waiting period is up, you can have the plan administrator of your old employer’s 401(k) transfer your funds to your new employer’s 401(k) (assuming the new plan accepts rollover contributions).