Retirement accounts
Can I Use My 401(k) to Buy a House? The Loan, the Withdrawal, and What Each Costs
Can you use a 401(k) to buy a house? Yes, via a loan or a hardship withdrawal. Here is the tax, the penalty, and the compounding each one costs you.

Yes, you can use your 401(k) to buy a house, and there are exactly two ways to do it: a 401(k) loan, which you pay back to your own account with interest, or a hardship withdrawal, which you never pay back and which is taxed as ordinary income plus a 10% penalty if you are under 59½. Your employer's plan has to offer each one. Neither is required by law, so whether either route exists at all is a question for the plan administrator rather than the lender.
The difference between those two routes is not a detail. On the same $50,000, one is repaid into your own account and the other permanently removes about $380,000 from your balance at 65. Here is the mechanism behind that number.
The two routes at a glance
| 401(k) loan | Hardship withdrawal | |
|---|---|---|
| Maximum | Lesser of $50,000 or 50% of your vested balance | The amount of the need, if the plan allows it |
| Income tax now | None | Yes, at your ordinary rate |
| 10% penalty under 59½ | None | Yes |
| Money returns to the account | Yes, with interest | Never |
| Main risk | Leaving the job makes the balance due | Permanent loss of compounding |
Route 1: the 401(k) loan for a down payment
A plan loan is not a distribution. You are borrowing against your own balance, so nothing is reported as income and no penalty applies. The statutory ceiling is the lesser of $50,000 or 50% of your vested balance. Vested is not the same as your balance, because employer match dollars you have not yet earned the right to keep do not count toward it. There are two further wrinkles: a plan may permit up to $10,000 when half the vested balance falls below that, and the $50,000 is reduced by the highest loan balance you carried in the previous twelve months. If your vested balance is $60,000, your ceiling is $30,000, not $50,000. The $50,000 is fixed in the statute and is not indexed for inflation, so it does not move from one tax year to the next.
How long do you get to pay it back?
Plan loans generally have to be repaid within five years. There is a specific carve-out for a principal residence: if the loan is used to buy the home you will actually live in, the plan is allowed to give you a longer term. Fifteen years is a common choice. The general rules on how much you can borrow from a 401(k) and on what schedule apply either way. Repayment is usually by automatic payroll deduction, and the interest rate is set by the plan, commonly the prime rate plus one or two points. With prime at 6.75% in July 2026, that puts a typical plan loan somewhere in the high 7s to high 8s.
The interest goes into your own account, which is why the loan gets described as borrowing from yourself. That framing is mostly right and slightly wrong. The principal you repay is money that was already yours. The interest, though, comes out of your take-home pay after tax, goes into a pre-tax account, and gets taxed again as ordinary income when you eventually withdraw it in retirement. On a $50,000 loan at 8.5% over fifteen years, that is roughly $38,600 of interest passing through the tax system twice.
What happens if you leave the job?
This is the part that turns a loan into a distribution, and it is the loan-specific piece of what happens to a 401(k) when you leave a job. Plans differ on what happens next: some let a former employee keep making payments, others call the full balance due within a short window. Where repayment does not happen, the plan offsets the unpaid amount against your account, and that offset is treated as a distribution: ordinary income tax, plus the 10% additional tax if you are under 59½.
Since 2018 there has been real relief here. You have until the due date of your tax return for the year of the offset, including extensions, to roll an equal amount into an IRA or another eligible plan and avoid the tax entirely. That requires having the cash to do it, which is a difficult thing to produce in the months after losing a job.
That is the real shape of the risk. Not the loan itself, but the correlation: the event that ends your job is the same event that creates the tax bill, and it lands in a year when your income is already falling.
Route 2: the 401(k) hardship withdrawal for a home purchase
The IRS treats costs directly related to the purchase of a principal residence as a safe-harbor hardship reason. Down payment and closing costs qualify. Mortgage payments on a home you already own do not, and neither does a second home or an investment property.
So a hardship withdrawal is hit twice: once as ordinary income at your marginal rate, and once by a flat 10% additional tax. That is true of every approved hardship reason, not only a home purchase. What survives depends almost entirely on which bracket the distribution lands in, and a large withdrawal can push part of your income into a higher one. The bracket rates used from here on are the 2026 federal ones.
Run the arithmetic in the other direction and it gets sharper. If you need $50,000 to actually reach the closing table and the distribution lands in the 22% bracket, you have to withdraw $73,529 to net it. Of that, $16,176 goes to federal income tax, $7,353 to the penalty, and $50,000 to you.
The IRA first-time homebuyer exception
This is the rule most people are actually thinking of. Under section 72(t)(2)(F), an IRA owner can take up to $10,000 for a first home without the 10% penalty. The details that matter:
- It is $10,000 over your lifetime, not per purchase. A married couple who both qualify can each use their own $10,000. The cap has sat at $10,000 since 1997 and is not indexed for inflation.
- "First-time" is generous. The statute asks that neither you nor your spouse held a present ownership interest in a principal residence during the two-year period ending on the date of acquisition, which is the date a binding contract is signed or construction begins.
- It waives the penalty only. A traditional IRA distribution is still ordinary income, so $10,000 in the 22% bracket nets $7,800 rather than $6,800.
- The money has to be used within 120 days of receiving it.
- It attaches to the account the money comes out of, not to where the money originated. A distribution taken straight from a 401(k) does not qualify. The same dollars, once rolled into an IRA, do.
- With a Roth IRA, your own contributions come out tax-free and penalty-free at any time regardless. The $10,000 exception only matters for the earnings.
The cost that never appears on the closing statement
Tax and penalty are the visible bill. They are also the smaller one.
Money removed from a retirement account stops compounding permanently. Not for the length of a loan, not until you rebuild it, but permanently, because the years it would have compounded through are years you only get once. At a 7% nominal return, a dollar removed at 35 is 7.61 dollars that never exist at 65.
Both accounts in that chart start at $120,000, both add $8,000 at each year end, both earn 7% nominal. The only difference is a single $50,000 withdrawal at 35. Thirty years later the untouched account holds $1,669,157 and the other holds $1,288,544.
The ratio is what does the damage. The $16,000 of tax and penalty feels like the cost, but the full $380,613 gap is the cost, and only $34,000 of it ever reached your bank account. Every dollar of tax and penalty is itself a dollar that was going to compound: the $5,000 penalty alone represents $38,061 of age-65 balance.
Does the loan avoid this?
Partly. Borrowed money is also out of the market, so it stops earning the portfolio return while it is out. What replaces that return is the loan interest, which flows back into your own account. Whether you come out ahead or behind depends on whether your plan's loan rate is above or below what the market delivered over the same window, which is not knowable in advance. What is knowable is that the loan repays and the withdrawal does not, and that gap compounds for thirty years.
What the comparison actually is
The choice usually gets framed as buying a house versus not buying one. Mechanically it is narrower than that.
A loan trades market exposure for the loan rate and adds a repayment obligation tied to your employment. A hardship withdrawal converts roughly two-thirds of a gross amount into cash and writes the rest off, along with every year of growth that amount would have produced. An IRA offers a $10,000 penalty-free window on a first home: taxable out of a traditional IRA, not penalized in either.
Those three things cost very different amounts, and the number that separates them is not the one printed on the withdrawal form.