When unexpected expenses arise, dipping into retirement savings might make sense. But if you withdraw from the wrong type of tax-advantaged retirement account before age 59½, you might face a 10% penalty. 

There are a few key distinctions to keep in mind…

• Early withdrawals from IRAs and/or 401(k)s —which are funded with pretax dollars—may cost you a penalty in addition to income tax. This applies to the entire amount withdrawn, including contributions you made to the accounts as well as the portion of the withdrawals that represent earnings on those ­contributions. 

• Early withdrawals from Roth IRAs and/or Roth 401(k)s could mean a penalty and income tax (even though these are funded with after-tax dollars) on the earnings withdrawn but not the ­contributions.

Depending on circumstances, the IRS allows you to avoid a penalty (but not income tax). But the exemptions can differ for IRAs and 401(k)s. 

Example #1: My 40-year-old client decided to withdraw money from retirement accounts for a down payment on his first house. I advised him to take the money from his IRA rather than his 401(k). Reason: As a first-time home buyer, you are allowed to make an early withdrawal of up to $10,000 penalty-free (but not tax-free) from IRA contributions and earnings…and/or from Roth IRA earnings—but not from any type of 401(k). Other penalty exemptions for both types of IRAs but not 401(k)s: Paying for qualified education expenses…paying health insurance premiums while out of work. 

Helpful: If you have money in a 401(k) or a Roth 401(k), you still can take ­advantage of these exemptions by rolling money into the same type of IRA before taking the withdrawal. 

Example #2: A client in his mid-50s quit his job and decided to withdraw retirement assets early to cover some unexpected expenses. I directed him to take the money from his 401(k). Reason: You can make an early withdrawal of an unlimited amount of money penalty-free from your current employer’s 401(k) plan if you leave a job during or after the year of your 55th birthday. Another penalty exemption for 401(k)s but not IRAs: Taking assets out of a spouse’s 401(k) awarded to you in a divorce. 

Helpful: Some company plans allow you to roll money from an IRA into your 401(k), then take an early withdrawal. However, you cannot roll Roth IRA assets into a Roth 401(k). 

Finally, some common exemptions apply to both IRAs and 401(k)s. Examples: If you suffer a serious disability…or if medical expenses exceed 10% of your adjusted gross income for the year. For a complete list, go to IRS.gov and search for “Early ­Distributions.”