401(k) Loan vs HELOC: Cost Comparison
You need $35,000. You have a 401(k) with $180,000 vested and a home with $120,000 in equity. Both sources can fund the need — but the cost structures are fundamentally different. A 401(k) loan under IRC 72(p) lets you borrow from your own retirement balance, repay yourself with interest, and avoid taxes entirely if you follow the rules. A HELOC lets you tap home equity at a variable rate, deduct interest if you use the proceeds for home improvement (IRC 163(h)(3)), and keep your retirement savings compounding. The right choice depends on your job stability, your marginal tax rate, your time horizon to retirement, and what you are borrowing for. This guide breaks down the true cost of each option — including the opportunity cost that most comparisons ignore.
How a 401(k) loan works under IRC 72(p)
A 401(k) loan is not a withdrawal. You borrow from your own vested balance, and the plan transfers the loan amount from your investment allocation into a loan-receivable account. You repay the loan — principal plus interest — through payroll deductions, typically over five years (or up to 15 years if the loan is used to purchase a primary residence). The interest rate is set by the plan, usually prime rate plus one percentage point, and it is fixed for the life of the loan. Repayments go back into your own account.
The borrowing cap under IRC 72(p) is the lesser of $50,000 or 50% of your vested balance. If your vested balance is $60,000, you can borrow up to $30,000. If it is $200,000, you can borrow up to $50,000. Some plans impose stricter limits or prohibit loans entirely — the IRC sets the ceiling, but the plan document controls.
If you repay on schedule, the transaction is invisible to the IRS: no taxable event, no 1099-R, no penalty. If you default — by missing payments or failing to repay after separation from service — the outstanding balance becomes a deemed distribution. You owe ordinary income tax on the full amount plus a 10% early-withdrawal penalty under IRC 72(t) if you are under 59½.
How a HELOC works
A home equity line of credit is a revolving credit line secured by your home. The lender appraises your property, determines your loan-to-value ratio (LTV), and extends a credit line up to a combined LTV of 80–90% (first mortgage plus HELOC). If your home is worth $400,000 and your first mortgage balance is $250,000, you have $150,000 in equity. At 80% combined LTV, your maximum HELOC is $70,000 ($400,000 × 0.80 − $250,000).
HELOC rates are variable, typically tied to the prime rate plus a margin. As of early 2026, most HELOCs carry rates between 7.5% and 9.5%, depending on credit score, LTV, and lender. The draw period is usually 10 years, during which you can borrow and repay flexibly, often making interest-only payments. The repayment period (typically 10–20 years after the draw period ends) requires full principal-and-interest payments.
Interest is deductible under IRC 163(h)(3) only if the proceeds are used to buy, build, or substantially improve the home securing the loan. Using HELOC funds for debt consolidation, tuition, or a vacation means the interest is not deductible — a change enacted by the Tax Cuts and Jobs Act of 2017.
Side-by-side cost structure
| Factor | 401(k) loan | HELOC |
|---|---|---|
| Borrowing cap | Lesser of $50,000 or 50% of vested balance | Up to 80–90% combined LTV |
| Interest rate | Fixed; typically prime + 1% (~9.5% in 2026) | Variable; typically prime + margin (~7.5–9.5%) |
| Who receives the interest | You (repaid into your own 401(k)) | The lender |
| Interest deductibility | Never deductible | Deductible if used for home improvement |
| Repayment term | 5 years (15 for primary residence purchase) | 10-year draw + 10–20-year repayment |
| Credit check required | No | Yes |
| Impact on credit score | None (not reported to bureaus) | Reported; affects utilization and DTI |
| Job-loss risk | Outstanding balance due by tax-filing deadline | Repayment continues on original terms |
| Asset at risk | Retirement savings (via deemed distribution) | Home (via foreclosure on default) |
| Origination cost | Minimal ($50–$100 processing fee) | Appraisal, title search, possible closing costs ($0–$2,000+) |
The hidden cost: opportunity cost of lost compounding
The comparison table above captures the direct costs, but the largest cost of a 401(k) loan is invisible: the investment return you forfeit while the money is out of the market. When you borrow $35,000 from your 401(k), that $35,000 moves from your investment allocation (equities, bonds, target-date funds) into a loan-receivable account earning only the loan interest rate. You are “paying yourself” 9.5% interest — but if the market returns 10% during the same period, you have lost money on the spread.
This is not a theoretical risk. Over any five-year repayment window, a diversified equity portfolio has historically returned more than the typical 401(k) loan rate in the majority of periods. The opportunity cost compounds: $35,000 out of the market for five years at a 7% average annual return (net of the loan rate) costs approximately $14,000 in forgone growth. That is real money that will not be in the account at retirement.
A HELOC has no opportunity cost against retirement savings. Your 401(k) stays fully invested. You pay interest to the lender instead of to yourself, but your retirement compounding is uninterrupted. For someone 20 years from retirement, this single factor often dominates the entire comparison.
The double-taxation problem on 401(k) loan interest
When you repay a 401(k) loan, both principal and interest come from your after-tax paycheck. The interest goes back into your pre-tax 401(k) account. When you withdraw that money in retirement, you pay income tax on it again. The interest is taxed twice: once when you earn the paycheck to make the repayment, and again when you distribute it in retirement.
On a $35,000 loan at 9.5% over five years, total interest paid is approximately $9,300. If your marginal tax rate is 24% now and 22% in retirement, the double-tax cost on the interest is roughly $9,300 × 22% = $2,046 in additional retirement taxes that would not exist with a HELOC. This is a modest amount on its own, but it compounds the opportunity-cost problem.
Job-loss acceleration: the 401(k) loan’s unique risk
If you separate from your employer — whether you quit, are laid off, or are terminated — your 401(k) loan typically must be repaid by the tax-filing deadline for the year of separation (including extensions, so October 15 of the following year under current rules). If you cannot repay the remaining balance, it becomes a deemed distribution: taxable as ordinary income, plus a 10% penalty if you are under 59½.
Example: you borrow $35,000, repay $14,000 over two years, and are laid off with $21,000 outstanding. If you cannot repay the $21,000 by the filing deadline, you owe income tax on $21,000 (approximately $5,040 at the 24% bracket) plus a $2,100 early-withdrawal penalty — a total of $7,140 in taxes and penalties on money you intended to repay.
A HELOC has no employment-linked acceleration clause. If you lose your job, the HELOC repayment terms remain unchanged. You still owe the payments, and default can lead to foreclosure, but the timeline does not compress because of a job change.
Worked example: Dana, age 42, borrowing $35,000 for a kitchen renovation
Dana earns $115,000, has $180,000 vested in her 401(k), and owns a home appraised at $380,000 with a $240,000 mortgage balance. She needs $35,000 for a kitchen renovation.
Option A: 401(k) loan
- Loan amount: $35,000 (within the $50,000 cap and under 50% of vested balance)
- Interest rate: 9.5% fixed (prime + 1%)
- Repayment: $735/month for 60 months via payroll deduction
- Total interest paid over 5 years: ~$9,100 (repaid to her own account)
- Opportunity cost: $35,000 out of market for an average of 2.5 years (midpoint of amortization). At 8% average return, forgone growth is approximately $7,700
- Double-tax cost on interest: ~$2,000 (at a 22% retirement distribution rate)
- Total true cost: ~$9,700 (opportunity cost + double-tax cost)
- Risk: involuntary job loss triggers deemed distribution on outstanding balance
Option B: HELOC
- Available equity: $380,000 × 0.80 − $240,000 = $64,000
- Draw amount: $35,000
- Interest rate: 8.25% variable (prime + 0.75%)
- Interest-only payments during draw: ~$241/month
- Total interest paid over 5 years (assuming interest-only, then full repayment): ~$14,400
- Tax deduction: because the proceeds fund home improvement, interest is deductible under IRC 163(h)(3). At the 24% bracket, tax savings: ~$3,460
- Net interest cost after deduction: ~$10,940
- Opportunity cost against retirement: $0 (401(k) stays fully invested)
- Total true cost: ~$10,940
- Risk: home is collateral; rate is variable and could increase
The verdict for Dana
The 401(k) loan appears cheaper on a pure-cost basis (~$9,700 vs. ~$10,940), but the gap is narrow — and it ignores the job-loss risk entirely. If Dana has strong job security and plans to stay with her employer for at least five more years, the 401(k) loan is marginally cheaper. If there is any realistic chance of a job change or layoff, the HELOC is safer: it protects her retirement savings, preserves compounding, and the interest deduction (since this is a home improvement) narrows the cost difference significantly.
If Dana were borrowing for debt consolidation instead of home improvement, the HELOC interest would not be deductible, making the 401(k) loan more clearly favorable on cost — as long as job stability holds.
When a 401(k) loan wins
- No home equity or poor credit. If you cannot qualify for a HELOC (insufficient equity, low credit score, high DTI), the 401(k) loan may be your only sub-10% borrowing option. No credit check is required.
- Small loan, short duration. Borrowing $10,000–$15,000 for 12–24 months minimizes opportunity cost and double-tax drag. The setup is faster and cheaper than a HELOC.
- Non-deductible purpose. If you are borrowing for debt consolidation, medical expenses, or any purpose that does not qualify for HELOC interest deduction, the 401(k) loan’s “pay yourself” structure is more attractive.
- Ironclad job security. Tenured professors, civil servants with strong job protections, and employees with no intention of leaving eliminate the acceleration risk.
When a HELOC wins
- Home improvement with deductible interest. The IRC 163(h)(3) deduction reduces the effective rate by your marginal tax rate, often making the HELOC cheaper on a net basis.
- Large borrowing need. The $50,000 401(k) cap is hard. If you need $60,000 or $80,000, only the HELOC can cover it in a single facility.
- Long time horizon to retirement. The further you are from retirement, the more expensive the opportunity cost of pulling money out of the market. For someone 20+ years out, preserving compounding is worth a higher stated interest rate.
- Job instability or career flexibility. If you might change jobs, pursue entrepreneurship, or face industry-wide layoff risk, the 401(k) loan’s acceleration clause is a ticking bomb.
- Roth 401(k) balance. Borrowing from a Roth 401(k) is especially costly because the forgone growth would have been entirely tax-free. The opportunity cost of removing money from a Roth bucket is higher than from a traditional bucket.
Alternatives to both
Before committing to either option, evaluate whether a third path fits better:
- Home equity loan (fixed-rate second mortgage). Same collateral as a HELOC, but with a fixed rate and predictable payments. Often available at rates 0.25–0.50% above HELOC rates. No variable-rate risk.
- Personal loan. Unsecured, no home or retirement assets at risk. Rates are higher (10–15% for strong credit), but the loan size is typically capped at $50,000–$100,000 and funding is fast.
- Cash-out refinance. If mortgage rates are favorable relative to your existing rate, rolling the borrowing need into a new first mortgage can produce the lowest blended rate. Closing costs are higher, and you reset your amortization clock.
- 0% introductory APR credit card. For smaller needs ($5,000–$15,000) with a clear 12–18 month repayment plan, a 0% promotional card costs nothing if paid off before the promotional period ends.
Key takeaways
- A 401(k) loan caps at $50,000 or 50% of your vested balance, requires no credit check, and is repaid through payroll deductions at a fixed rate (typically prime + 1%). The interest goes back to your own account, but you lose market returns on the borrowed amount and face double taxation on the interest portion.
- A HELOC can exceed $50,000 (limited by home equity and LTV), carries a variable rate tied to prime, and does not affect retirement savings. Interest is deductible only if the proceeds fund home improvement under IRC 163(h)(3).
- The true cost of a 401(k) loan is not the stated interest rate — it is the opportunity cost of lost compounding plus the double-tax drag on repaid interest. For someone 20 years from retirement, this hidden cost typically exceeds the visible interest savings.
- Job-loss acceleration is the 401(k) loan’s unique structural risk: separation from service triggers full repayment by the tax-filing deadline or a deemed distribution with taxes and a 10% penalty. A HELOC has no employment-linked acceleration.
- For home improvement specifically, the HELOC’s deductible interest often makes it the cheaper option after tax. For non-deductible purposes with strong job security, the 401(k) loan’s “pay yourself” structure can win on net cost — but only if you stay employed through the full repayment term.
Get the 2026 starter pack
Decision checklists + key 2026 federal/state numbers. Free, one click.
Frequently asked
Under IRC 72(p), you can borrow the lesser of $50,000 or 50% of your vested account balance. If your vested balance is $80,000, your maximum loan is $40,000. If your vested balance is $180,000, your maximum is still $50,000. Some plans set lower limits or do not permit loans at all — check your Summary Plan Description. The $50,000 cap is reduced by your highest outstanding loan balance in the prior 12 months, so repaying a previous loan and immediately reborrowing does not reset the limit.
If you separate from service (voluntarily or involuntarily), most plans require full repayment by the tax-filing deadline for the year of separation, including extensions. Under the Tax Cuts and Jobs Act of 2017, you have until October 15 of the following year if you file an extension. If you cannot repay the outstanding balance by that deadline, the remaining amount is treated as a taxable distribution — subject to ordinary income tax plus a 10% early-withdrawal penalty under IRC 72(t) if you are under 59½. This is the single largest risk of a 401(k) loan: an involuntary job loss converts what was intended as a temporary loan into a permanent, penalized withdrawal.
No. Interest on a 401(k) loan is never tax-deductible, regardless of how you use the proceeds. You repay the loan — principal and interest — with after-tax dollars from your paycheck. The interest goes back into your own 401(k) account, which sounds beneficial, but it means you are depositing after-tax money into a pre-tax account. When you eventually withdraw that money in retirement, you will pay ordinary income tax on it again. This creates a double-taxation layer on the interest portion that does not exist with a HELOC.
It depends on what you use the proceeds for. Under IRC 163(h)(3) as amended by the Tax Cuts and Jobs Act, HELOC interest is deductible only if the funds are used to buy, build, or substantially improve the home that secures the loan. If you use a HELOC to consolidate credit card debt, pay medical bills, or fund a business — the interest is not deductible. The combined limit for deductible home acquisition debt (first mortgage plus HELOC used for home improvement) is $750,000 for loans originated after December 15, 2017.
For home improvement specifically, a HELOC usually wins on total cost. The interest is tax-deductible (reducing the effective rate), the loan does not interrupt your retirement compounding, and there is no job-loss acceleration risk. A 401(k) loan for home renovation means you pay non-deductible interest with after-tax dollars, lose compounding on the borrowed amount, and face a potential tax bomb if you change jobs. The main exception is if your HELOC rate is very high (above 9–10%), your 401(k) loan rate is low, you have strong job security, and the renovation is small enough that the opportunity cost is modest.
Related guides
In-Service Withdrawal: 401(k) to IRA While Still Employed
If you are considering a 401(k) loan because you need access to retirement funds, an in-service withdrawal may be a better path — moving the money to an IRA you control without the repayment obligation or job-loss risk.
Solo 401(k) for Side Hustle: Setup, Roth Bucket, Mega-Backdoor
Self-employed individuals with a solo 401(k) can borrow from it under the same IRC 72(p) rules. This guide covers the full plan mechanics including contribution limits and Roth buckets.
Stable Value Funds: Hidden Yield and Why to Care
The opportunity cost of a 401(k) loan depends on what your money would have earned. If your 401(k) is invested in stable value funds rather than equities, the forgone return is lower — changing the math.
Net Unrealized Appreciation (NUA) Distribution Tax Trick
Before taking a 401(k) loan on employer stock, understand NUA — a strategy that can convert ordinary income into long-term capital gains on appreciated company shares.
Get the Life Money USA starter pack
Decision checklists, 2026 federal + state numbers, and our glossary. One click, free.
Send me the starter pack