You can take money from your 401(k) to buy a house, but the rules depend on whether you borrow against it or withdraw it outright

A 401(k) holds money you've set aside for retirement, but you're not locked out of it before retirement age. You have two main paths: borrow from your 401(k) through a loan, or withdraw money early. A loan lets you repay yourself with interest and keep the tax hit smaller. An early withdrawal gives you the cash when ready but triggers income tax and possibly a 10 percent penalty. Which option makes sense depends on your age, how much you need, and whether you can repay a loan on schedule.

The house itself doesn't matter to the IRS — you can use 401(k) money for a down payment, closing costs, or to pay off a mortgage. What matters is which method you choose and whether you meet the conditions for that method.

Key Takeaways

  • A 401(k) loan lets you borrow up to 50 percent of your vested balance (or $50,000, whichever is less) and repay it over five years, with no income tax due on the borrowed amount.
  • An early withdrawal before age 59½ triggers ordinary income tax plus a 10 percent penalty, unless you meet a narrow exception like a Roth conversion ladder or the Rule of 55.
  • If you leave your job, you typically must repay a 401(k) loan within 60 days or it becomes a taxable withdrawal.
  • Not all 401(k) plans allow loans or early withdrawals, so you need to check your plan documents or contact your plan administrator first.
  • Borrowing from your 401(k) reduces the balance earning investment returns and may lower your retirement savings if you cannot repay on time.

How a 401(k) loan works for a home purchase

A 401(k) loan lets you borrow money from your own account and repay it with interest. The IRS sets the maximum: you can borrow up to 50 percent of your vested balance, or $50,000, whichever is smaller. If your vested balance is $80,000, you can borrow up to $40,000. If it's $120,000, you can borrow up to $50,000.

You repay the loan through payroll deductions, usually over five years. Your plan administrator sets the interest rate, which is typically the prime rate plus 1 or 2 percentage points. The interest you pay goes back into your own 401(k) account, not to a bank or lender. Because you're borrowing your own money and repaying yourself, there is no income tax on the borrowed amount — only on the interest, and only when you eventually withdraw it in retirement.

The loan must be repaid on schedule. If you leave your job, most plans require you to repay the full remaining balance within 60 days. If you don't, the unpaid balance is treated as an early withdrawal, which means you owe income tax plus the 10 percent penalty on the entire amount.

Early withdrawal rules and the 10 percent penalty

If you withdraw money from your 401(k) before age 59½, the IRS normally charges a 10 percent early withdrawal penalty on top of ordinary income tax. On a $50,000 withdrawal, that's $5,000 in penalty alone, plus income tax at your marginal rate — potentially $10,000 to $20,000 in total tax depending on your income bracket.

The penalty applies to the amount you withdraw, not the amount you use for the house. If you withdraw $60,000 to cover a $50,000 down payment and closing costs, you pay the penalty on all $60,000.

However, the IRS recognizes a few exceptions where you can withdraw early without the 10 percent penalty. The most common for a home purchase is the first-time homebuyer exception, which allows you to withdraw up to $10,000 lifetime from a traditional IRA (not a 401(k)) without the penalty. A 401(k) does not have this exception — only IRAs do. If you have an IRA, you can use this route. If you only have a 401(k), you cannot.

Another exception is the Rule of 55: if you leave your job in the year you turn 55 or later, you can withdraw from that employer's 401(k) without the 10 percent penalty. The income tax still applies, but not the penalty. This works only for the 401(k) at the employer you just left, not for 401(k)s from previous employers.

Comparing a 401(k) loan to an early withdrawal

Feature401(k) LoanEarly Withdrawal (Before 59½)
Income tax on amount takenNo (only on interest repaid later)Yes, at your ordinary tax rate
10 percent penaltyNoYes (unless exception applies)
Repayment requiredYes, usually over 5 yearsNo
If you leave your jobMust repay within 60 days or it becomes a taxable withdrawalAlready withdrawn; no repayment needed
Maximum amount50% of vested balance, up to $50,000Any amount in your account
Impact on retirement savingsMoney still in account earning returns while you repay; interest goes back inMoney is gone; no future growth on withdrawn amount

What happens if you cannot repay a 401(k) loan

If you borrow $40,000 and then lose your job or cannot make the payments, the unpaid balance becomes a taxable withdrawal. You owe income tax on the full unpaid amount plus the 10 percent early withdrawal penalty (unless you're 59½ or older, or another exception applies). If you borrowed $40,000 and can only repay $20,000 before you leave your job, the remaining $20,000 is treated as an early withdrawal, and you owe tax and penalty on that $20,000.

This is why a 401(k) loan works best if you're confident you'll stay in your job and can afford the monthly repayment. If your employment is uncertain or your budget is tight, an early withdrawal (if you can absorb the tax hit) may be safer than a loan you cannot repay.

Checking whether your plan allows loans or withdrawals

Not every 401(k) plan permits loans. Some employers restrict them, and some ban them entirely. The same is true for early withdrawals — some plans allow them, others do not. You need to check your plan's rules before assuming you can take either route.

Contact your plan administrator (usually your employer's HR or benefits department, or a third-party administrator) and ask for the plan's Summary Plan Description or the loan and withdrawal provisions. This document spells out what you're allowed to do. You can also log into your 401(k) account online; many providers show loan and withdrawal options directly in the account dashboard.

If your plan doesn't allow loans but does allow early withdrawals, a withdrawal is your only option. If it allows loans but not early withdrawals, a loan is your only option. If it allows both, you can choose based on your situation.

Rolling over a 401(k) to an IRA for more flexibility

If your 401(k) plan is restrictive — for example, it doesn't allow loans — you may be able to roll the money into a traditional IRA or Roth IRA to access more options. An IRA offers the first-time homebuyer exception ($10,000 lifetime from a traditional IRA, no penalty), which a 401(k) does not.

However, rolling over a 401(k) to an IRA has trade-offs. You lose access to the 401(k) loan option entirely. You also lose the Rule of 55 protection if you're 55 or older. And if you have a Roth 401(k), rolling it to a traditional IRA converts the tax-free growth to tax-deferred growth. Before rolling over, understand what you're giving up.

A rollover is a separate transaction from a withdrawal or loan. You instruct your 401(k) provider to move the money directly to an IRA custodian (like Fidelity, Vanguard, or Schwab). If done correctly, it's not a taxable event. If you take the money yourself and miss the 60-day important date to deposit it in an IRA, it becomes a taxable withdrawal.

Tax consequences and how to estimate your bill

A 401(k) loan has no when ready tax bill, but the interest you pay is taxable when you withdraw it in retirement. If you borrow $40,000 at 7 percent interest over five years, you'll pay roughly $7,400 in interest. That $7,400 is added to your 401(k) balance and will be taxed as ordinary income when you withdraw it later.

An early withdrawal is taxed when ready. The amount you withdraw is added to your other income for the year and taxed at your ordinary income tax rate. If you're in the 24 percent federal tax bracket and withdraw $50,000, you owe roughly $12,000 in federal income tax, plus state income tax if your state has one, plus the 10 percent penalty ($5,000). That's $17,000 or more in total tax on a $50,000 withdrawal.

To estimate your tax bill, use the IRS tax brackets for your filing status and income, or ask a tax professional. Your 401(k) provider can also give you a rough estimate based on your account balance and withdrawal amount.

Frequently Asked Questions

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

If you have a Solo 401(k) (a 401(k) for self-employed people), you can borrow from it under the same rules as a regular 401(k) — up to 50 percent of your vested balance or $50,000, whichever is less. If you have a SEP IRA or Solo IRA instead, loans are not allowed. Check your plan documents to confirm which type you have.

What if I have both a 401(k) and an IRA?

You can use either one, but the rules differ. A 401(k) loan is available if your plan allows it. An IRA allows the $10,000 first-time homebuyer exception (no penalty, but income tax applies). You can also withdraw from an IRA without penalty if you're 59½ or older. Consider which account has the most money and which rules work best for your situation.

Do I have to pay back a 401(k) loan if I retire?

If you retire and are 59½ or older, you can stop making loan payments without the loan being treated as a taxable withdrawal. The unpaid balance straightforward remains in your account as a loan. However, if you retire before 59½, the unpaid balance is treated as an early withdrawal, and you owe income tax plus the 10 percent penalty on the amount you don't repay.

Can I use a 401(k) loan to pay off a mortgage instead of a down payment?

Yes. The IRS doesn't care what you use the money for — down payment, closing costs, or paying off an existing mortgage. The loan rules are the same regardless. You borrow up to your limit, repay over five years, and owe tax only on the interest.

What happens to my 401(k) loan if I get laid off?

You typically have 60 days to repay the full remaining balance. If you don't, the unpaid amount becomes a taxable withdrawal, and you owe income tax plus the 10 percent penalty (unless you're 59½ or older or another exception applies). Some plans allow you to extend the repayment period if you're unemployed, so contact your plan administrator when ready if this happens to you.