If you take money out of a retirement account to buy a house (for example to make a down payment), you can avoid the 10% early withdrawal penalty … but only on IRA withdrawals. 

The rules on retirement withdrawals are tricky and vary between 401(k) accounts and IRAs.

With home purchases, you can take money out of a 401(k) plan, but you’re going to be hit with BOTH regular income tax and the 10% early withdrawal penalty.

If you take money out of an IRA, it’s different. You can withdraw up to $10,000 for a home purchase, penalty free, if you meet the requirements of being a first-time homebuyer. (NOTE: you still pay income tax on the withdrawal, but not the 10% penalty.)

The rules on what constitutes a first-time homebuyer are surprisingly lenient. You qualify as a first-time homebuyer as long as you had no ownership interest in a primary residence for at least 2 years before the date of your current home purchase.

That means you could, theoretically, do this every 2 years. Big warning: $10,000 is the lifetime limit, so while you could do this every 2 years, you’re actually done once you get to $10,000.

What if you take out more than $10,000? In that case, only the first $10,000 is penalty free.

Example: let’s say you take out $40,000 to make a down-payment on a home. The entire $40,000 is subject to income tax, and $30,000 is subject to the 10% early withdrawal penalty. 

You account for the exception to the 10% penalty by filling out Form 5329 and using code “09.”