When you leave your job, no matter the reason, your 401k can come along.

Some financial advisors make it seem like a complicated process, but a 401k rollover (where you transfer your money from one retirement plan to another) is really very simple. And as long as you do it the right way – a direct rollover – you won’t have to pay any taxes or IRS penalties.

You can also leave your 401k in your ex-employer’s plan, but you won’t be able to contribute anymore.

The most important rule to remember here: Make sure the rollover check is not in your name. If the check is made out to you, the IRS requires a 20% withholding tax – a huge chunk of your account. Plus, if you miss the rollover deadline by even 1 day, they’ll hit you with an additional 10% tax penalty.

To avoid that 30% tax hit, you’ll need to have another retirement plan in place that can accept the funds from your 401k. That new plan can be an IRA (Roth or traditional) or your new employer’s 401k plan.

When you directly roll your 401k over into either a traditional IRA or a new 401k plan, you won’t have to deal with any taxes until you start withdrawing the money. Rolling over into a Roth IRA will trigger immediate income taxes, but then your eventual withdrawals would be tax-free.

Once you’ve decided where to put your old 401k funds, ask your old 401k plan for a direct rollover (make sure to use those specific words) and give them your full new account information. You’ll get a notification when your funds arrive in the new account.

Last step: Decide how you want to invest those funds. If you’ve rolled over into a new employer’s 401k plan, you’ll be limited by their investment options, usually a dozen or so mutual funds. With an IRA (whether Roth or traditional), you’ll be have a much broader range of investment choices, including individual stocks and bonds, mutual funds, and ETFs (exchange-traded funds).