Skip to main content

Using Your 401(k) to Buy a House: What You Can Actually Do

You can tap your 401(k) for a down payment, but the method matters—and so do the taxes

Yes, you can use money from your 401(k) to buy a house. The IRS allows it through three distinct routes: a loan from your plan, an early withdrawal under the "first-time homebuyer" exception, or a withdrawal after you've separated from your employer. Each route has different tax consequences, repayment rules, and limits. The choice depends on your age, how much you need, whether your plan offers loans, and whether you can afford to repay what you borrow.

The trap most people fall into is treating their 401(k) like a savings account. It isn't. Money you take out before age 59½ normally triggers a 10% early withdrawal penalty on top of ordinary income tax—unless you use one of the specific exceptions the IRS carved out. A $50,000 withdrawal at age 45 could cost you $15,000 or more in taxes and penalties if you choose the wrong method.

Key Takeaways

  • A 401(k) loan lets you borrow from your own balance, repay it to yourself with interest, and avoid taxes—but you must repay it within five years for a home purchase, and you lose that money's growth while it's borrowed.
  • The first-time homebuyer exception lets you withdraw up to $10,000 lifetime without the 10% early withdrawal penalty, but you still owe ordinary income tax on the full amount.
  • If you've left your job, you may withdraw from your old 401(k) without penalty after age 55, though income tax still applies.
  • Borrowing from your 401(k) puts your down payment at risk if you lose your job—the loan becomes due within 60 days or it's treated as a taxable withdrawal.
  • Your plan document determines what's actually available; not all employers offer loans, and some restrict how you can use borrowed funds.

401(k) loans: borrow from yourself, repay with interest

A 401(k) loan is the most straightforward option if your plan offers it. You borrow money from your own account balance, and you repay it to your own account with interest. The interest rate is typically the prime rate plus 1 to 2 percentage points—currently somewhere between 9% and 11%, depending on your plan and market conditions. That interest goes back into your account, not to a bank.

The IRS allows you to borrow up to 50% of your vested balance, with a maximum of $50,000. If your balance is $100,000, you can borrow up to $50,000. If it's $80,000, you can borrow up to $40,000. You must repay the loan within five years for a home purchase (other loans have different timelines). Payments are usually deducted from your paycheck, so repayment is automatic.

The tax advantage is real: you don't pay income tax on the borrowed amount, and you don't pay the 10% early withdrawal penalty. But there's a hidden cost. The money you borrowed stops growing. If your 401(k) would have earned 7% annually, and you borrow $50,000 for five years, that's roughly $18,000 in lost growth. You're also paying interest to yourself, which means you're putting money back in, but at a rate lower than the market return you gave up.

The biggest risk: if you leave your job, the loan becomes due in full within 60 days. If you can't repay it, the IRS treats the unpaid balance as a taxable withdrawal, and you owe the 10% penalty on top of income tax. This is why borrowing from your 401(k) for a down payment is risky if your job is unstable.

First-time homebuyer exception: $10,000 lifetime withdrawal

The IRS allows a one-time withdrawal of up to $10,000 from your 401(k) without the 10% early withdrawal penalty if you're a first-time homebuyer. "First-time" means you haven't owned a home in the past two years—you don't have to be buying your first house ever. You can use the money for a down payment, closing costs, or other home-purchase expenses.

The catch: this $10,000 limit is lifetime, not annual. If you withdraw $10,000 at age 35 to buy your first house, you cannot use this exception again, even if you sell that house and buy another 20 years later. You still owe ordinary income tax on the full $10,000 withdrawal. If you're in the 24% federal tax bracket, a $10,000 withdrawal costs you $2,400 in federal tax, plus state tax if your state taxes retirement income.

This exception works best if you're young, have a small down payment gap, and can absorb the tax hit in that year. It's less useful if you need $30,000 or $40,000 for a down payment, because you can only withdraw $10,000 penalty-free. The rest would trigger the 10% penalty unless you use another method.

Age 55 separation rule: penalty-free withdrawal after leaving your job

If you've separated from your employer and you're at least 55 years old, you can withdraw from your old 401(k) without the 10% early withdrawal penalty. This rule doesn't apply to IRAs, only to 401(k)s and similar employer plans. You still owe ordinary income tax on the withdrawal, but the penalty is waived.

This is useful if you're close to 55, have left your job, and need funds for a down payment. A $50,000 withdrawal at age 55 costs you income tax but no penalty. At age 54, the same withdrawal would cost you $5,000 in penalty plus income tax—a significant difference.

The rule applies only to the 401(k) from the employer you just left. If you have a 401(k) from a previous employer, you'd need to be 59½ to avoid the penalty, or use one of the other exceptions. Some people roll their old 401(k) into their new employer's plan to take advantage of this rule, but that's a separate decision with its own tax implications.

Roth 401(k) withdrawals: contributions come out tax-free

If your employer offers a Roth 401(k) option and you've been contributing to it, the rules are different. You can withdraw your contributions (the money you put in) at any time, tax-free and penalty-free. You cannot withdraw the earnings (the growth) without penalty before age 59½, unless you meet an exception.

This is useful if you've built up Roth contributions over several years. If you've contributed $25,000 to a Roth 401(k) and it's now worth $30,000, you can withdraw the $25,000 contribution for your down payment without tax or penalty. The $5,000 in earnings stays in the account.

The challenge is that most people haven't been contributing to a Roth 401(k) long enough to have a large contribution base. If you started contributing last year, you only have last year's contributions available. Roth 401(k)s are also less common than traditional 401(k)s, so check your plan documents to see if yours offers this option.

Comparing the costs: loan versus withdrawal

MethodTax on withdrawal10% penaltyRepayment requiredBest for
401(k) loanNoneNoneYes, within 5 yearsStable employment, larger amounts, avoiding taxes
First-time homebuyer exceptionYes, ordinary rateNoNoSmall gap to down payment, first home, under 59½
Age 55+ separationYes, ordinary rateNoNoRecently left job, age 55 or older
Roth contribution withdrawalNone on contributionsNoneNoBuilt-up Roth contributions, any age

A concrete example: you're 45, employed, and need $40,000 for a down payment. Your 401(k) balance is $120,000.

Option 1: Borrow $40,000. You repay it over five years at roughly 10% interest. Your monthly payment is about $850. You pay no tax now. The cost: $18,000 in interest plus $18,000 in lost growth (assuming 7% annual return). Total cost: roughly $36,000 over five years.

Option 2: Withdraw $40,000 using the first-time homebuyer exception. You can only withdraw $10,000 penalty-free. The other $30,000 triggers the 10% penalty. At a 24% tax bracket, you owe $7,200 in federal tax on the $30,000 plus $2,400 in tax on the $10,000. Total tax bill: $9,600. You don't repay anything, but you've permanently reduced your retirement savings.

In this scenario, the loan is cheaper if you can afford the $850 monthly payment and keep your job. The withdrawal is cheaper if you expect to leave your job soon or can't afford the repayment.

What happens if you leave your job with an outstanding loan

This is the scenario that catches people off guard. You borrow $40,000 from your 401(k), buy the house, and six months later you're laid off or you take a new job. Your old employer's plan requires you to repay the loan within 60 days. If you can't, the unpaid balance is treated as a taxable withdrawal.

Let's say you owe $38,000 on the loan when you leave. You have 60 days to repay it. If you don't, the IRS treats that $38,000 as a withdrawal. You owe income tax at your ordinary rate (let's say 24%, so $9,120) plus the 10% early withdrawal penalty ($3,800). Total tax bill: $12,920. You also lose the money from your retirement account.

Some people roll their old 401(k) into an IRA to extend the repayment deadline, but the rules are complex and depend on your plan. Check with your plan administrator before you borrow if job stability is a concern.

Frequently Asked Questions

Can I borrow from my 401(k) if I'm self-employed or have a Solo 401(k)?

Yes, Solo 401(k)s allow loans, and the rules are the same: up to 50% of your balance, maximum $50,000, repay within five years for a home. However, if you're the only employee and you leave "employment" (which is blurry for self-employed people), the loan rules still apply. Consult a tax professional before borrowing from a Solo 401(k).

Does my employer have to offer 401(k) loans?

No. Your plan document determines what's available. Some employers don't offer loans at all. Check your plan summary or ask your benefits administrator whether loans are available and what the terms are. If your plan doesn't offer loans, you can't borrow—you'd have to use a withdrawal method instead.

What if I'm buying a second home—can I use the first-time homebuyer exception?

No. The exception applies only if you haven't owned a home in the past two years. A second home, investment property, or vacation home doesn't count. You'd need to use a loan or another withdrawal method.

Can I withdraw from my spouse's 401(k) to buy a house together?

No. You can only withdraw from your own 401(k). Your spouse can withdraw from theirs using the same methods, but you can't access their account. If you're married and both have 401(k)s, you each have separate $10,000 first-time homebuyer limits.

If I take a loan, do I still contribute to my 401(k) while repaying?

Yes. Your loan repayment is separate from your regular contributions. If you contribute $500 per paycheck and your loan payment is $850, your total deduction is $1,350. You can continue contributing to your 401(k) while repaying the loan, which is actually a good idea to keep your retirement savings growing.