Yes, but it costs you money and comes with strict rules

You can take money from your 401(k) to buy a house, but the IRS charges you a penalty and income tax on the withdrawal unless you meet specific conditions. The two main legal routes are a 401(k) loan, where you borrow from your own account and pay yourself back, and an early withdrawal, where you take the money out permanently. A 401(k) loan is usually cheaper because you avoid the tax hit, but you have to repay it or face penalties. An early withdrawal lets you keep the money but triggers a 10% penalty plus income tax on the amount you take out — unless you may have access to for an exception.

The house itself does not have to be your primary home. You can use 401(k) money to buy a second home, investment property, or vacation home. However, the IRS does not care what you buy the house with — it only cares whether you follow the withdrawal rules. Taking money out the wrong way can cost you thousands in taxes and penalties on top of what you owe in income tax.

Key Takeaways

  • A 401(k) loan lets you borrow up to 50% of your vested balance (or $50,000, whichever is less) and repay it over five years, with no tax penalty if you repay on time.
  • An early withdrawal before age 59½ triggers a 10% penalty plus income tax unless you may have access to for an exception like the first-time homebuyer rule.
  • The first-time homebuyer exception lets you withdraw up to $10,000 lifetime from a traditional IRA (not a 401(k)) with no 10% penalty, though you still owe income tax.
  • If you leave your job, you typically have 60 days to repay a 401(k) loan or it becomes a taxable withdrawal with penalties.
  • Borrowing from your 401(k) reduces the money that grows for retirement and leaves you exposed if you cannot repay the loan.

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

A 401(k) loan lets you borrow money from your own account without triggering the 10% early withdrawal penalty. You borrow up to 50% of your vested account balance, with a maximum of $50,000. If your account is worth $100,000 and you are fully vested, you can borrow up to $50,000. If your account is worth $60,000, you can borrow up to $30,000.

You repay the loan through payroll deductions, usually over five years, though some plans allow longer terms for a primary home purchase. You pay yourself back with interest — the rate is typically the prime rate plus 1%, which your plan administrator sets. Because you are repaying your own account, the interest goes back into your 401(k), not to a bank.

The big advantage is that there is no tax penalty and no income tax bill when you take the loan out. The catch is that if you leave your job before the loan is repaid, you typically have 60 days to pay back the full remaining balance. If you do not, the unpaid amount becomes a taxable withdrawal, and you owe the 10% penalty plus income tax on it.

Early withdrawal with the first-time homebuyer exception

If you withdraw money before age 59½, the IRS normally charges you a 10% penalty plus income tax. However, there is a narrow exception for first-time homebuyers — but it only applies to IRAs, not 401(k)s. This is a common source of confusion.

If you have a traditional IRA, you can withdraw up to $10,000 lifetime for a first-time home purchase with no 10% penalty. You still owe income tax on the withdrawal, but the penalty is waived. The IRS defines a first-time homebuyer as someone who has not owned a home in the past two years. You have 120 days to use the money to buy or build a home, or you can use it to pay closing costs, down payment, or other acquisition costs.

A 401(k) does not have this exception. If you withdraw early from a 401(k) for any reason, including a home purchase, you owe the 10% penalty plus income tax unless you may have access to for a different exception (disability, medical bills, or a few others). This is why some people roll a 401(k) into an IRA first — to access the first-time homebuyer rule — but that rollover itself has rules and timing requirements.

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

If you take out a 401(k) loan and then cannot repay it, the unpaid balance becomes a taxable withdrawal. You owe income tax on the full amount, plus the 10% early withdrawal penalty if you are under 59½. If you borrowed $40,000 and cannot repay $15,000 of it, you owe income tax and the penalty on that $15,000.

This is especially risky if you lose your job or change employers. Most plans require you to repay the full loan balance within 60 days of leaving the company. If you do not, the loan is treated as a distribution. You will owe taxes on it when you file your return, and the IRS may also charge interest and penalties if you do not pay the tax bill on time.

Some employers offer a grace period or let you continue making payments after you leave, but this is not standard. Check your plan documents or ask your plan administrator what happens to your loan if you leave the company.

The cost of borrowing from your 401(k) versus a mortgage

A 401(k) loan is not the same as a mortgage, and it is usually more expensive in the long run. A mortgage spreads payments over 15 to 30 years at a fixed rate. A 401(k) loan is typically five years, so your payments are much higher. If you borrow $100,000 from your 401(k) at 7% interest over five years, your monthly payment is about $1,980. A $100,000 mortgage at 7% over 30 years is about $665 per month.

The bigger cost is what you lose in retirement savings. Money you borrow from your 401(k) stops growing. If you borrow $100,000 and the market returns 7% per year, you lose $7,000 in growth that first year alone. Over 30 years, that $100,000 could grow to over $700,000. When you repay the loan, you are putting money back in, but you have lost years of compound growth.

An early withdrawal is even more expensive. If you withdraw $100,000 before age 59½, you owe 10% in penalties ($10,000) plus income tax. If you are in the 24% tax bracket, you owe another $24,000 in tax. You only get $66,000 to buy the house, but you lost $100,000 from your retirement account.

Alternatives to borrowing from your 401(k)

Before you borrow from your 401(k), consider other options. A conventional mortgage or FHA loan may have lower rates and longer terms. If you do not have a down payment, some lenders offer down payment information programs, and some states have first-time homebuyer grants that do not require repayment.

If you have a Roth IRA (not a Roth 401(k)), you can withdraw your contributions — the money you put in — at any time without penalty or tax. You cannot withdraw the earnings without penalty, but the contributions are yours to take out. This is different from a traditional IRA, where all withdrawals before 59½ are subject to the penalty and tax.

A home equity line of credit (HELOC) or home equity loan is another option if you already own a home. These typically have lower rates than a 401(k) loan and longer repayment terms. Borrowing from family or taking out a personal loan are also worth considering, depending on your situation and the rates available to you.

Tax consequences and what to expect on your return

If you take a 401(k) loan, there is no when ready tax consequence. You do not report it on your tax return, and your employer does not send you a tax form. However, if the loan is not repaid and becomes a distribution, your plan administrator will send you a Form 1099-R, and you will owe income tax and the 10% penalty on your return.

If you do an early withdrawal, your plan administrator sends you a Form 1099-R showing the amount withdrawn. You report this on your tax return. The 10% penalty is calculated on the form, and you owe it along with income tax at your marginal rate. If you may have access to for an exception (like the first-time homebuyer rule for an IRA), you can claim the exception on your return to waive the penalty, but you still owe the income tax.

The tax bill can be substantial. If you withdraw $50,000 and you are in the 22% tax bracket, you owe $11,000 in income tax plus $5,000 in penalties — $16,000 total. This is money you have to pay when you file your return, not money withheld from the withdrawal. Some people are surprised by the bill and do not have the cash to pay it.

Frequently Asked Questions

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

It depends on your plan. If you have a Solo 401(k) (a 401(k) for self-employed people), you can usually take a loan from it. If you have a SEP IRA or Solo Roth IRA, you cannot take a loan — these plans do not allow loans. Check your plan documents or ask your plan provider.

What if I roll my 401(k) into an IRA to use the first-time homebuyer exception?

You can roll a 401(k) into a traditional IRA and then withdraw up to $10,000 for a first-time home purchase with no 10% penalty. However, you still owe income tax on the withdrawal. Also, if your 401(k) has a loan outstanding, you cannot roll it over until the loan is repaid. Plan the timing carefully and talk to a tax professional.

Do I have to use the money within a certain time after I withdraw it?

For a 401(k) loan, there is no important date — you can use the money whenever you want. For the first-time homebuyer exception on an IRA, you have 120 days to use the money for a home purchase. If you do not use it within 120 days, you still owe income tax on it, and the 10% penalty applies.

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

Most plans require you to repay the full loan balance within 60 days of leaving your job. If you do not repay it, the unpaid amount becomes a taxable withdrawal, and you owe income tax plus the 10% penalty if you are under 59½. Some employers offer a grace period or let you continue payments, but this is not may provide. Ask your plan administrator before you leave.

Can I borrow from my spouse's 401(k)?

No. You can only borrow from your own 401(k). Your spouse cannot borrow from your account, and you cannot borrow from theirs. Each person can only access their own account.