Finance and Budgeting

401(k) Loan Calculator

Estimate the payment and interest on a 401(k) loan, and check it against the IRS maximum and repayment term.

Your numbers

Set by your plan, so use the rate in your plan documents. 8.5% is an example.

More options

Used to compare your loan with the IRS maximum.

An example rate for comparing growth you give up while the money is out of the market.

The IRS allows a longer term than five years for that purpose.

The IRS permits this exception but does not require plans to offer it.

Result

Biweekly payment

$189.09

$20,000.00 at 8.5% for 5 years (18.6% of what you repay is interest)

Number of payments
130
Total repaid
$24,582.33
Total interest
$4,582.33
Interest paid back into your own account
$4,582.33

Loan by year

YearPrincipalInterestBalance
1$3,351.41$1,565.05$16,648.59
2$3,648.23$1,268.23$13,000.36
3$3,971.34$945.12$9,029.01
4$4,323.07$593.40$4,705.95
5$4,705.95$210.52$0.00
How this was calculated
  1. Rate per payment = 8.5% / 26 = 0.326923%. Payments n = 26 x 5 = 130.
  2. Payment = loan x i / (1 - (1 + i)^-n) = $20,000.00 x 0.00326923 / (1 - (1 + 0.00326923)^-130) = $189.09.
  3. Total repaid = 130 x $189.09 = $24,582.33, of which $4,582.33 is interest. That interest goes to your own account, not to a lender.
  • Informational only, not advice. Plan fees, origination charges, income taxes on repayments and later withdrawals, and what happens if you leave your job or miss payments (the unpaid balance can be taxed as a distribution) are not modeled. Your plan documents control.

Next step

How to use the 401(k) loan calculator

  1. Enter the loan amount, the interest rate from your plan and the repayment term in years.
  2. Choose how often you repay through payroll: monthly, twice a month, every two weeks, weekly or quarterly.
  3. Open More options to enter your vested balance, which checks the loan against the IRS maximum, and to compare the loan with leaving the money invested at an example return.
  4. Read the payment, total interest and the year-by-year table. The CSV lists every payment.

Formula

i = annual rate / payments per year; n = payments per year x years

Payment = loan x i / (1 - (1 + i)^-n)

Total repaid = payment x n; total interest = total repaid - loan

Interest each period = remaining balance x i; principal = payment - interest

Growth given up = loan x (1 + g)^n - payment x ((1 + g)^n - 1) / g, with g = account return / payments per year

The interest you pay on a plan loan goes into your own account rather than to a lender. It is still a cost because the money you borrowed is no longer invested while you repay it.

Worked examples

Biweekly repayment: a $20,000 loan at 8.5% over 5 years with 26 payments a year is 130 payments of $189.09. You repay $24,582.33, so $4,582.33 is interest paid back into your own account.

Monthly repayment: the same loan repaid monthly is 60 payments of $410.33, with $4,619.84 of interest, slightly more because the balance is paid down more slowly.

Staying invested: if the $20,000 had stayed invested at 7% and your biweekly repayments earned the same 7% as they arrived, you would end with about $1,018.43 more by borrowing, because the loan rate of 8.5% is higher than 7%. At a 12% return, borrowing costs you growth instead. Zero rate: $10,000 over 2 years with no interest is $416.67 a month.

IRS rules the calculator checks

According to the IRS, a participant can generally borrow up to the lesser of 50% of the vested account balance or $50,000. If 50% of the vested balance is under $10,000, a plan may allow a loan of up to $10,000, but plans are not required to include this exception. Loans generally must be repaid within five years, with payments at least quarterly, and a longer term is allowed when the loan is used to buy a primary residence. These rules were read on the IRS website on October 10, 2026. Plans are not required to offer loans at all, and a plan may set stricter terms.

If you enter your vested balance, the calculator compares the loan with the maximum. If you enter a term longer than five years without checking the primary residence box, it shows a warning. Earlier loans can reduce what you may borrow, which is not modeled here.

What happens if you cannot repay

The IRS treats a loan that fails the rules, or one that goes into default, as a distribution. The unpaid balance may then be taxable income and may also face the 10% additional tax on early distributions. If you leave your employer with a loan outstanding, plans often require repayment on a short schedule. Check your plan documents before you borrow. Nothing here models taxes or penalties.

Is "paying interest to yourself" a benefit?

The interest is credited to your account, so it is not lost. But the money you borrowed no longer grows with the market, and the interest rate on the loan may be lower or higher than what the investments would have earned. The comparison in More options estimates that difference with an example return you choose. It is a scenario, and actual returns vary.

Assumptions and limits

  • The payment is a level amount at a fixed rate, paid at the end of each payroll period, and the term must be a whole number of payments.
  • The interest rate is the one you enter. The tool does not know your plan's rate, which many plans tie to a published prime rate.
  • The comparison with staying invested uses one constant return and assumes repayments are invested as they arrive.
  • Loan fees, taxes on repayments and withdrawals, penalties, earlier loans and what happens if you leave your job are not modeled.
  • The IRS maximum check uses the vested balance you enter. Your plan may set lower limits or other conditions.
  • This is informational only and not tax, legal or investment advice. Your plan documents control.

Formulas reviewed October 10, 2026. See the calculation methodology for how SumPanda rounds, tests and sources its formulas.

Frequently asked questions

How much can I borrow from my 401(k)?

Under IRS rules, generally the lesser of half your vested balance or $50,000, with a possible $10,000 exception when your plan allows it. Existing loans can reduce the amount, and your plan can set lower limits, so confirm with the plan administrator.

How long do I have to repay a 401(k) loan?

Generally five years, with payments at least quarterly. A longer term is allowed if the loan is for buying a primary residence. The calculator warns when your term is above five years and the residence box is not checked.

Where does the interest go?

Interest on a plan loan is paid into your own account, so you are paying it to yourself. It is still a cost to compare with what your investments might have earned over the same period.

What if I leave my job with a loan outstanding?

Plans commonly require the balance to be repaid on a short timeline, and an unpaid balance can be treated as a taxable distribution. The IRS describes a rollover option to avoid immediate tax, so read your plan and talk to a tax professional.

Does repaying every two weeks reduce the total interest?

Slightly. With 26 payments a year, principal is paid down a little sooner, so interest accrues on a smaller balance. Total interest on the default loan is $4,582.33 biweekly versus $4,619.84 monthly.

Sources