HELOC vs 401(k) loan: what borrowing $30,000 costs each way, and the job-change risk
A 401(k) loan borrows from your own retirement savings: there is no credit check, the interest goes back into your account, and the IRS caps it at the lesser of $50,000 or half your vested balance, usually repaid within five years. A HELOC borrows against your home: it can be larger and last longer, but your house secures it and the rate usually moves with the prime rate.
The biggest difference shows up if your job changes. A 401(k) loan can come due when you leave your employer, and an unpaid balance becomes taxable. Below: the rules for each, what $30,000 costs both ways, and what changes the answer. If a HELOC looks like the better fit, comparing offers from several lenders shows you real rates.
HELOC vs 401(k) loan: the main differences
| Feature | HELOC | 401(k) loan |
|---|---|---|
| You borrow from | A lender, against your home equity | Your own retirement account |
| Maximum | Set by the lender from your equity, credit and income | Lesser of $50,000 or 50% of your vested balance |
| Rate | Usually variable: prime plus a margin | Set by your plan; must be a reasonable rate |
| Interest goes to | The lender | Back into your 401(k) |
| Repayment | A draw period, then a repayment period | Generally within 5 years, at least quarterly, often by payroll deduction |
| Credit check | Yes, usually a hard inquiry | No; not reported to the credit bureaus |
| If you leave your job | No change | Plan may require full repayment |
| If you can’t pay | The CFPB warns you could lose your home | Balance becomes a taxable distribution, possibly plus a 10% additional tax |
Sources listed at the end. Plan and lender terms vary.
How much can you borrow from your 401(k)?
First, your plan has to offer loans. The IRS says a plan sponsor is not required to include loan provisions, and IRAs, SEPs and SIMPLE IRAs can’t make loans at all.
If loans are allowed, the IRS limit is generally the lesser of 50% of your vested account balance or $50,000. The IRS gives the example of a participant who may borrow up to $40,000, the lesser of half his vested balance and $50,000. Plans may also allow up to $10,000 even when that is more than half your vested balance, but they don’t have to.
Some plans require your spouse’s written consent for a loan over $5,000.
401(k) loan repayment rules
- Five years, generally. The IRS says you must repay a plan loan within five years, in substantially equal payments of principal and interest made at least quarterly.
- Longer for a home purchase. A loan used to buy your principal residence may be repaid over more than five years.
- Payroll deduction. FINRA says most plans collect payments from your paycheck.
- Missed payments. A loan that breaks the repayment rules becomes a “deemed distribution”: the remaining balance is taxable income and may be subject to the 10% early distribution tax.
What happens to a 401(k) loan if you leave your job?
This is the main risk. The IRS says your employer may require you to repay the full outstanding balance if you leave, and FINRA says you’ll typically have 90 days. If you don’t repay, the plan reduces your account by the unpaid amount (a “plan loan offset”), which is treated as a taxable distribution.
When the offset comes from leaving your job or the plan ending, the IRS gives you until your federal tax filing due date, including extensions, to roll over the offset amount, for example by depositing that much cash into an IRA. That takes cash equal to the unpaid balance.
If the offset is taxed, you may also owe the 10% additional tax on early distributions if you are under 59½. The IRS lists exceptions, including distributions after you separate from service with your employer after reaching age 55. A tax professional can tell you whether one applies to you.
Example: leaving 18 months in. You borrow $30,000 at 8.00% over five years. After 18 payments, about $22,219 is still owed. If you leave your job and can neither repay nor roll it over, that $22,219 is added to your income. At an assumed 22% federal tax rate that is about $4,888, plus $2,222 if the 10% additional tax applies: about $7,110 before any state tax.
A HELOC’s risk is different: the CFPB says that if you fall behind, “you could lose your home,” and the lender may stop further draws if your home’s value drops significantly or your finances change.
Is a 401(k) loan really “paying yourself interest”?
Partly. FINRA confirms that “the interest you pay is paid into your 401(k).” Your plan sets the rate, and federal rules require a reasonable rate, one that gives the plan a return comparable to what commercial lenders charge in similar circumstances.
Three things offset that benefit:
- Lost growth. FINRA notes that “the money you withdraw will not grow if it’s not invested.” If your investments would have earned more than the loan rate, your account ends up smaller.
- After-tax repayments. FINRA points out that you repay with after-tax pay that will be taxed again when you withdraw it in retirement from a pre-tax account.
- The job-change risk above, which can turn the loan into a taxable withdrawal.
What a HELOC costs
Most HELOCs charge a variable rate: an index, usually the prime rate, plus a margin set by your credit and equity. Prime has been 7.00% since September 17, 2026 (the prime rate page tracks it). When prime moves, your rate moves with it.
A HELOC can also carry closing costs and annual fees, though some lenders pay closing costs if you keep the line open for a set time; home equity closing costs has examples. In return, the limit depends on your equity rather than a $50,000 cap (see how much equity you can borrow), and repayment often runs well past five years. The HELOC payment calculator shows both phases.
HELOC interest may also be tax deductible. IRS Publication 936 says interest on home equity loans and lines of credit is deductible only if the money is used to buy, build or substantially improve the home that secures the loan, and you itemize. See is HELOC interest tax deductible.
Worked example: $30,000 from a 401(k) loan vs a HELOC
Assumptions: your vested 401(k) balance is $90,000, so the IRS limit is $45,000 and $30,000 fits. Your plan charges 8.00% (an example; your plan sets its own rate). The HELOC is at 8.50%: the 7.00% prime rate plus an example 1.50% margin. Both are repaid over five years. HELOC fees, taxes and rate changes are left out.
| Option | Monthly | Total interest |
|---|---|---|
| 401(k) loan at 8.00% | $608 | $6,498 |
| HELOC at 8.50% | $616 | $6,930 |
On payments alone, the 401(k) loan looks far cheaper, because its $6,498 of interest lands back in your account while the HELOC’s goes to the lender. But the $30,000 leaves your investments for five years. The table below compares where you end up (retirement account minus what you paid out of pocket) under three hypothetical yearly returns.
| If the $30,000 would have earned | Difference |
|---|---|
| 0% a year | 401(k) loan ahead by $6,930 |
| 4% a year | 401(k) loan ahead by $4,131 |
| 10% a year | HELOC ahead by $1,823 |
Calculated by LenderMatch. Assumes 401(k) repayments are reinvested at the same return as they come in. Hypothetical returns are illustrations, not predictions, and this is not investment advice.
The break-even sits close to the HELOC’s rate: in this example, if the money would have earned less than about 8.4% a year, the 401(k) loan comes out ahead on paper; if more, the HELOC does. It also assumes you keep your job for all five years. FINRA suggests talking with an investment or tax professional about the effects of borrowing from your retirement account.
Is it better to borrow from a 401(k) or a HELOC?
A 401(k) loan tends to fit when:
- the amount is small enough to repay within five years,
- your job feels secure for that whole period,
- your credit would make a HELOC expensive or hard to get (see HELOC with bad credit), or
- you don’t want a lien on your home.
A HELOC tends to fit when:
- you need more than a 401(k) loan allows, or longer to repay,
- a job change is possible,
- you are close to retirement and want your savings left invested (see home equity in retirement), or
- the money goes into the home, where the interest may be deductible (HELOC for home improvement).
For paying off credit cards, see using a HELOC to pay off credit cards, or HELOC vs personal loan for an option that pledges neither your savings nor your house. Does a HELOC hurt your credit covers the credit side.
Frequently asked questions
Is it better to borrow from a 401(k) or a HELOC?
It depends on your job security, the amount and how long you need to repay. A 401(k) loan needs no credit check and its interest goes back into your account, but it is capped at $50,000 and can come due if you leave your job. A HELOC can be larger and longer, but your home secures it.
How much can I borrow from my 401(k)?
If your plan offers loans, generally the lesser of 50% of your vested balance or $50,000, according to the IRS. Some plans allow up to $10,000 even when that is more than half your vested balance. Plans are not required to offer loans at all, and you can’t borrow from an IRA.
What happens to my 401(k) loan if I quit or get laid off?
Your plan may require you to repay the full balance. If you don’t, the unpaid amount is treated as a distribution: it is taxable, and you may owe a 10% additional tax if you are under 59½. You can avoid the immediate tax by rolling over that amount, for example into an IRA, by your tax filing deadline including extensions.
Does a 401(k) loan affect your credit score?
Not directly. Experian says plan administrators don’t run credit checks and payments aren’t reported to the three major credit bureaus. A HELOC application usually involves a hard credit inquiry, and the line appears on your credit reports.
Can I use a 401(k) loan for a down payment on a house?
Plans may allow it. The IRS says a loan used to buy your principal residence may be repaid over more than five years. For a second home or investment property, see our guide on using a HELOC to buy another house.
See HELOC offers from several lenders →
Sources
- IRS, “Retirement topics: Loans” (last reviewed February 26, 2026): plans not required to offer loans, $50,000 / 50% limit and example, five-year repayment, spousal consent, repayment on leaving employment.
- IRS, “Retirement plans FAQs regarding loans” (last reviewed February 26, 2026): quarterly payments, principal residence exception, deemed distributions, rollover deadline for offsets.
- IRS, “Plan loan offsets” (last reviewed June 27, 2026).
- IRS, Topic no. 558, Additional tax on early distributions from retirement plans other than IRAs (last reviewed September 24, 2026).
- IRS, Publication 936 (2025), Home Mortgage Interest Deduction.
- 29 CFR 2550.408b-1(e), reasonable rate of interest on participant loans (accessed October 22, 2026).
- FINRA, “Retirement Accounts” (accessed October 22, 2026) and “What You Need to Know About 401(k) Loans” (October 31, 2016).
- Experian, “How Does a 401(k) Loan Work?” (December 26, 2025).
- CFPB, “What is a home equity line of credit (HELOC)?” (last reviewed August 28, 2026).
- Federal Reserve, H.15 Selected Interest Rates: bank prime loan rate 7.00%, unchanged since September 17, 2026.
Last reviewed October 22, 2026.