Breakeven Math
Down payment 401(k) Loan • PMI (Private Mortgage Insurance) • S&P 500 Opportunity Cost

401(k) Loan vs. PMI Down Payment Calculator

Compares borrowing from a 401(k) to reach 20% down with paying PMI, by net worth after the years chosen.

1. Home Purchase & Down Payment

Home Specs

2. 401(k) Loan Terms & Opportunity

IRS Limits
Net Worth Difference

401(k) loan path ahead by $17,574 after 7 years

Net worth comparison over 7 years
PMI Avoided With the Loan

$17,325

$206/mo for 84 months without the loan
401(k) Balance vs No Loan

+$2,944

At the end of the comparison
401(k) Loan Payment

-$1,026/mo

During the loan term
Plan loan term

5 Years

Plan rules apply on leaving a job
How the paths differ:

Borrowing $50,000 from the 401(k) brings the down payment to 20%, so the loan carries no PMI. Over 7 years that changes PMI by

7,325 and mortgage interest by

1,755. The 401(k) ends

,944
higher, because the loan interest paid into it exceeds the assumed return, and the

1,550 of loan interest, paid with after-tax money, is taxed again on withdrawal (

,541 at 22%).

Net worth at the end of the comparison

Path A (pay PMI) vs path B (401(k) loan)
Equal budgets

Educational estimate, not advice. Figures are illustrative; consult a professional for your situation.

What this calculator does

A buyer who has less than 20% down can put down the cash they have and pay private mortgage insurance (PMI), or borrow from a 401(k) to make the down payment larger. This calculator follows both paths month by month for the number of years chosen and reports which leaves more net worth at the end, and why: the PMI and mortgage interest the loan avoids, the 401(k) loan payment, how the retirement account compares, and the tax on the loan interest.

How the math works

Both paths use a 30-year fixed mortgage at the same rate. Path A borrows the price minus the cash; path B also subtracts the 401(k) loan. PMI is charged on a path whose loan is over 80% of the price, at the PMI rate on the original loan, until the scheduled balance reaches 80% of the price, the point at which a borrower can ask to cancel it.

  • Equal budgets. Each month the path with the smaller total outlay (mortgage, PMI, and in path B the 401(k) loan payment) invests the difference at the expected return, so the comparison is between equal spending.
  • The 401(k). In path A the borrowed amount stays invested at the expected return. In path B it leaves the account, and each loan payment, principal and interest, goes back in and grows from then on.
  • Tax on loan interest. Loan interest is paid from after-tax pay into a pre-tax account and taxed again on withdrawal, so path B is charged the total interest times the withdrawal tax rate.
  • Net worth at the end is home equity plus the 401(k) amount plus the invested difference. House price changes are left out because they are the same in both paths.

Worked example

The defaults describe a $500,000 home, $50,000 of cash, a 6.5% mortgage, PMI at 0.55%, and a $50,000 401(k) loan at 8.5% over 5 years, with a 7% expected return, a 22% withdrawal tax rate and a 7-year comparison.

  • Path A: a $450,000 mortgage at $2,844.31 a month plus $206 of PMI, which lasts until month 95, so all 84 months of the comparison: $17,325.
  • Path B: the 401(k) loan brings the down payment to $100,000, 20%, so the $400,000 mortgage costs $2,528.27 a month with no PMI. The 401(k) loan adds $1,026 a month for five years.
  • Over 7 years: path B pays $17,325 less PMI and $21,755 less mortgage interest. Its 401(k) ends $2,944 higher than path A's, because the 8.5% loan interest paid into it beats the 7% assumed return, and the $11,550 of loan interest carries $2,541 of tax on withdrawal.
  • Result: path B ends $17,574 ahead.

How to read the result

The headline is the difference in net worth after the years compared, with spending held equal. It is not cash in hand: most of it sits in home equity and the 401(k). A positive figure for the loan path means the PMI and mortgage interest it avoids outweigh what the 401(k) gives up; the explanation under the headline separates those pieces.

The expected return moves the result most. At the defaults the loan path is $17,574 ahead; with a 10% return it is $5,442 ahead, and with 4% it is $27,075 ahead, because the money taken out of the 401(k) would have grown more or less. The horizon matters too: over 2 years the loan path is $3,202 ahead, over 12 years $27,797, since PMI on path A keeps running until month 95.

Sources

Sources checked October 2026. Mortgage, PMI and plan loan rates are inputs; the calculator does not supply market rates.

Common mistakes

  • Counting the full market return as the cost of the loan. The loan's interest goes back into the borrower's own account; the cost is the gap between what the money would have earned and what it earns as home equity, plus tax on the interest.
  • Treating PMI as permanent. PMI on a conventional loan can be cancelled on request at 80% of the original value and ends automatically at 78%.
  • Borrowing too little to reach 20%. A $30,000 loan on the defaults still leaves a mortgage over 80% of the price, so PMI remains and the loan path's advantage falls to $6,588.
  • Ignoring what happens on leaving the job. An unpaid plan loan can be offset against the account and taxed as a distribution unless it is rolled over by the tax-return deadline for that year.
  • Forgetting the cash flow. For the loan term the 401(k) payment is due on top of the mortgage; at the defaults path B's monthly outlay is about $500 higher for five years.

Frequently Asked Questions

How much can be borrowed from a 401(k) for a down payment?

The IRS sets the most a plan can lend as the lesser of $50,000 or the greater of $10,000 and half of the vested balance; a $40,000 balance allows $20,000. A plan does not have to offer loans at all, and can set lower limits. This calculator caps the loan at $50,000 and at the amount needed to buy the house.

Does a 401(k) loan have to be repaid within five years?

Generally yes, in substantially equal payments of principal and interest made at least quarterly. The IRS notes that a loan used to buy the employee's principal residence may be repaid over a longer period, if the plan allows it. The calculator takes the term as an input.

What happens to a 401(k) loan after leaving the job?

Many plans require the balance to be repaid when employment ends; an unpaid balance can be offset against the account and treated as a distribution. Since 2018, a plan loan offset caused by leaving the job can be rolled over until the due date of that year's tax return, including extensions. The calculator assumes the loan is repaid on schedule.

When does PMI stop on a conventional loan?

Under the Homeowners Protection Act, as the CFPB explains, the borrower can ask to cancel PMI when the balance is scheduled to reach 80% of the home's original value, and the servicer must end it automatically at 78%. At the defaults, the 80% point arrives in month 95, so PMI runs through the whole 7-year comparison.

Related