Here’s a summary of different ways you can withdraw money from your 401(k) plan prior to retirement, and what will happen if you do.

Withdrawals Before Age 59 1/2

Any withdrawal made from your 401(k) will be treated as taxable income and subject to income taxes in the year in which you made it, before or after retirement. However. you’ll also be subject to a 10% early distribution penalty if you’re younger than age 59 1/2 at the time you take the withdrawal. You can avoid these taxes and the penalty with a trustee-to-trustee transfer. This involves rolling over some or all of your 401(k) assets into another qualified account. You might consider a 401(k) loan if you want to access your account’s assets because of financial hardship. You can take a penalty-free withdrawal from your 401(k) before reaching age 59 1/2 for a few reasons, however:

You pass away, and the account’s balance is withdrawn by your beneficiary. You become disabled. Your unreimbursed medical expenses are more than 7.5% of your adjusted gross income for the year. You begin “substantially equal periodic” withdrawals. Your withdrawal is the result of a Qualified Domestic Relations Order (QDRO) after a divorce. You’re at least 55 years old and have been laid off, fired, or quit your job, otherwise known as the “Rule of 55.”

Withdrawals After Age 59 1/2

Age 59 1/2 is the magic number when it comes to avoiding the penalties associated with early 401(k) withdrawals. You can take penalty-free withdrawals from 401(k) assets that have been rolled over into a traditional IRA when you’ve reached this age. You can also take a penalty-free withdrawal if your funds are still in the 401(k) plan, and you’ve retired. Your plan might offer an “in-service” withdrawal that allows you to access your 401(k) assets penalty-free, but not all plans offer this option. And remember, the withdrawal will still be subject to income taxes, even if it’s not penalized.

Withdrawals After Age 72

Many people continue to work well past age 59 1/2. They delay their 401(k) withdrawals, allowing the assets to continue to grow tax-deferred, but the IRS requires that you begin to take withdrawals known as “required minimum distributions” (RMDs) by age 72. Those who are owners of 5% or more of a business can defer taking their RMDs while they’re still working, but the plan must have made this election. This only applies to the 401(k) of your current employer. RMDs for all other retirement accounts still must be taken.

The Bottom Line

Having a solid retirement plan means understanding all available opportunities to use your savings in a way that meets your life goals. It’s important to know how and when you can withdraw from your 401(k) plan before you fully retire. Taking money out of a 401(k) during your working years could also push you into a higher tax bracket, and it will reduce the nest egg that’s available to you when you retire.