401(k) Loan Calculator: How Much You Can Borrow, the Payment, and the Tax if You Leave
How much a 401(k) or 403(b) plan can lend you (the lesser of $50,000, cut by your loan balance in the last 12 months, and half your vested balance or $10,000), the level payment, what a loan costs against leaving the money invested, and the tax bill if payments stop or you leave the job.
The most you can borrow
$40,000
Half of your vested balance (or $10,000 if that is more) is the limit that binds. Your plan can set a lower limit, and most do.
Repaying $30,000
$615.50
monthly for 60 payments, level, taken from your pay.
Against borrowing the same amount elsewhere
In account dollars at the end of the term, before tax, if every payment you would have made to the lender is invested at 6% instead. The rate your plan charges you does not change this number: the interest you pay yourself comes out of your own pay. What matters is the 6% the borrowed money would have earned against the 10% a lender charges.
If you leave the job after 24 payments
$6,239.25
of tax on $19,497.65 that the plan reports as a distribution, unless you roll the same amount into an IRA or another plan in time.
A loan offset because a job ends (or the plan ends) can be rolled over until the due date, including extensions, of the tax return for the year it happens (26 U.S.C. 402(c)(3)(C)). You roll over the same $19,497.65 from your own money, since the plan has already used the account to repay the loan. For an offset in 2026 that is April 15, 2027, or October 15, 2027 if you extend; for a later year it is the return's due date, April 15 or the next business day.
Estimate only, for federal rules. The limits and the treatment of an unpaid loan are 26 U.S.C. 72(p) and 26 CFR 1.72(p)-1; the rollover deadline is 26 U.S.C. 402(c)(3)(C). Not financial or tax advice. Confirm the terms with your plan administrator and the tax treatment with a tax professional.
Frequently asked questions
Q.How much can I borrow from my 401(k)?
The law caps a loan that is not taxed at the lesser of two amounts: $50,000, or the greater of half your vested balance and $10,000 (26 U.S.C. 72(p)(2)(A)). The new loan and every loan you already have from the plan must fit under that one ceiling. A $40,000 balance can borrow $20,000; a $200,000 balance can borrow $50,000, not more. The $10,000 floor helps a small account: with $15,000 vested you may still borrow up to $10,000. Your plan is not required to offer loans and can set a lower limit, a minimum, a fee, or allow only one loan at a time.
Anything over the limit is not a loan in the tax sense: it is treated as a distribution the day you receive it. In the regulation's example a participant with $200,000 vested who is lent $70,000 has a deemed distribution of $20,000 at once, and the remaining $50,000 is a loan (26 CFR 1.72(p)-1, Q&A-4, Example 1). With $30,000 vested the ceiling is $15,000, and a $20,000 loan has $5,000 over it (Example 2).
Q.Does a loan I already repaid lower what I can borrow now?
Yes, for 12 months. The $50,000 is reduced by how much the highest balance of your loans from the plan in the 12 months before the new loan exceeds the balance you owe on the day you borrow. The IRS's own example: a participant with $100,000 vested took a $40,000 loan on January 1, 2005, repaid in 20 quarterly installments, and owed $33,322 on January 1, 2006. The highest balance in the year before was $40,000, so the $50,000 falls by $6,678 to $43,322; the loan already owed counts against that, so the new loan can be $10,000 (IRS FAQ on plan loans; Q&A-20). Paying a loan off does not reset the look-back: the high-water mark stays in the 12-month window. The calculator uses the highest total balance of all your loans from the plan, as the IRS FAQ does.
Q.How long do I have to repay it, and how are the payments set?
Within five years, in substantially level payments that include interest and come at least quarterly (72(p)(2)(B) and (C); Q&A-3). Most plans take the payment from each paycheck. The one exception to five years is a loan used to buy a home that will be your main home within a reasonable time: it can run longer, and it need not be secured by the home (Q&A-5 and -6). A refinancing generally cannot use the exception, except a plan loan that pays off a bank loan that bought the home (Q&A-8). A plan may pause payments for up to a year of unpaid leave, or longer for military service, but the loan must still be repaid on time (Q&A-9). The interest you pay goes back into your own account, but repayments are not plan contributions (IRS FAQ). Interest on a loan secured by your elective deferrals is not deductible (72(p)(3)).
Q.What happens if I miss a payment?
A missed installment makes the loan a deemed distribution, and the amount is the whole outstanding balance including interest that has built up (Q&A-10). A plan may give a grace (cure) period, which cannot run past the last day of the calendar quarter after the quarter in which the payment was due. The regulation's example: $20,000 borrowed on August 1, 2002 and repaid monthly over five years, 12 payments made and the August 2003 payment missed. With a three-month cure period the deemed distribution is on November 30, 2003 and is $17,157; if the plan allowed the cure period to run to December 31 it would be $17,282. The rate is not printed in the regulation; every example in it is reproduced at 8.75%. A deemed distribution cannot be rolled over, it is reported on Form 1099-R, it is taxed as income, and the 10% additional tax applies before age 59½ unless another exception does (Q&A-11, -12, -14). The loan does not disappear: the unpaid balance still counts toward your limit for any later loan, and a later loan needs payroll deduction or extra security (Q&A-19).
Q.What happens to the loan if I quit or get laid off?
It depends on the plan. Some plans let you keep repaying; others require the loan to be repaid at once, and if you cannot, the plan reduces (offsets) your account by the unpaid balance. That offset is an actual distribution, not a deemed one, so it can be rolled over (Q&A-13; IRS FAQ). When the offset is caused by leaving the employer or by the plan ending, you have until the due date of your tax return for the year of the offset, including extensions, to put the same amount into an IRA or another plan (26 U.S.C. 402(c)(3)(C), in effect since 2018); before that it was the usual 60 days. For an offset in 2026 the 2026 return is due April 15, 2027, or October 15, 2027 if you extend. You roll over the amount of the offset from your own money, because the plan has already used the account to settle the loan.
If you do not roll it over, the unpaid balance is taxed as income, and the 10% additional tax applies before 59½ unless an exception does. One exception: distributions after you leave the employer in or after the year you turn 55 (72(t)(2)(A)(v); IRS table of exceptions), which an offset after you leave can use and a deemed distribution while you are still employed cannot. In the example the calculator opens with, a $30,000 loan at 8.5% over five years with 24 payments made leaves $19,498; at a 22% rate that is $4,289 of income tax plus $1,950 of additional tax before 59½, or $4,289 if the 55 exception applies.
Q.Is a loan from my 401(k) really cheap because I pay the interest to myself?
The interest you pay yourself comes out of your own pay, so it is not a return you earn on top of anything. What a plan loan costs you is what the borrowed money would have earned if it had stayed invested. Compared with a lender, borrowing from the plan wins when the lender's rate is higher than what the account would have earned and loses when it is lower, whatever rate the plan charges. With the calculator's default $30,000, five years and an assumed 6% return, borrowing from the plan instead of a lender at 10% leaves you $4,144 ahead in account dollars at the end of the term; against a lender at 4% you would be $1,756 behind. This is before tax and treats every payment you would have made to the lender as invested at that return. It does not count the cost of being forced to repay when you leave a job, a missed payment, or any months you contribute less to the plan while repaying.
Q.Can I borrow from an IRA?
No. Loans are only possible from qualified plans, 403(a) and 403(b) annuity plans and governmental plans; IRAs, SEPs and SIMPLE IRAs cannot lend. If an IRA owner borrows from the IRA, it stops being an IRA and its whole value is treated as distributed, and pledging part of an IRA as security treats that part as distributed (IRS FAQ on plan loans).
Sources
- 26 U.S. Code § 72(p) — loans treated as distributions: the $50,000 limit and its 12-month look-back, half the vested balance or $10,000, repayment within five years, level amortization at least quarterly, the home-purchase exception
- 26 CFR 1.72(p)-1 — Q&A-3 to Q&A-21: when a deemed distribution happens, the cure period, an offset versus a deemed distribution, refinancing and second loans, and the examples this calculator reproduces
- IRS — Retirement plans FAQs regarding loans: the plan maximum, the second-loan example ($43,322 and $10,000), what happens when a loan is not repaid, and the rollover period for a plan loan offset
- 26 U.S. Code § 402(c)(3)(C) — rollover of a qualified plan loan offset amount until the due date, with extensions, of the return for the year of the offset
- IRS — Exceptions to tax on early distributions: separation from service during or after the year you turn 55 (section 72(t)(2)(A)(v))