How a 401(k) Loan Works

A 401(k) loan lets you borrow from your own retirement account and pay the interest back to yourself — no bank, no credit check, no tax while the loan stays inside the IRS rules. The limits are federal law: the lesser of $50,000 or 50% of your vested balance, repaid within five years. This guide works the schedule on a $40,000 loan, prices the five years the money spends out of the market with BeadCalc's [retirement calculator](/finance/retirement-calculator/), and walks the job-change trap that turns a loan into a tax bill. Rules from IRS Retirement Topics — Plan Loans, verified November 17, 2026. For education only — not financial or tax advice.

By the BeadCalc team · Last updated: November 17, 2026 · 8 min read

A loan from yourself, not from a bank

A 401(k) loan is exactly what it sounds like: you borrow from your own account balance and repay it, with interest, into the same account. There is no lender on the other side, no credit check, and no application to a bank — the plan administrator moves the money and sets up payroll deductions for repayment. While the loan follows the IRS rules it is not a distribution, so no income tax is due when you take it and no 10% early-withdrawal penalty applies.

Two conditions come first. Your employer's plan must offer a loan feature — federal law permits it but never requires it, so some plans do not allow borrowing at all. And the loan rules cover qualified employer plans only: IRAs, including traditional, Roth, SEP and SIMPLE IRAs, have no loan provision whatsoever. Check the plan's Summary Plan Description before assuming you can borrow.

The interest is the part people misread. You pay it, but you pay it to yourself — every interest dollar lands back in your own account alongside the principal. That does not make the loan free, as the growth section below shows, but it does mean there is no lender collecting a spread on your balance.

How much you can borrow

The ceiling is the lesser of two numbers: $50,000, or 50% of your vested account balance. Vested means the portion you own outright — employer matching contributions that have not yet vested do not count. The $50,000 cap is fixed by statute and has never been adjusted for inflation. One wrinkle: the $50,000 limit is reduced by your highest outstanding loan balance from the plan during the 12 months before the new loan, so a recently repaid loan shrinks the next one.

Vested balance50% of balanceMaximum loan
$30,000$15,000$15,000
$80,000$40,000$40,000
$120,000$60,000$50,000 (capped)
$200,000$100,000$50,000 (capped)

There is also a small-balance exception a plan may — but is not required to — include: if 50% of your vested balance is less than $10,000, the plan can let you borrow up to $10,000. The example table above uses the standard rule. Plans can also set their own minimums, often $1,000, and cap the number of loans you can hold at once.

The repayment schedule

General-purpose loans must be repaid within five years, in substantially equal payments that include principal and interest, made at least quarterly. In practice almost every plan collects through payroll deduction, so the payment leaves each paycheck automatically. The one exception is a loan used to buy your primary residence: the five-year limit does not apply, and the plan sets a longer term.

The rate is set by the plan — commonly prime plus 1% — and the worked example below uses a 6% example rate, not a market quote. Borrow $40,000 for five years at 6% and the payment is $773.31 a month for 60 months: $46,398.72 in total, of which $6,398.72 is interest paid back into your own account. Borrow the $50,000 maximum on the same terms and the payment is $966.64 a month, $57,998.40 in total, with $7,998.40 of interest returning to you.

Loan (6%, 5 years)Monthly paymentInterest (to yourself)Total repaid
$40,000$773.31$6,398.72$46,398.72
$50,000$966.64$7,998.40$57,998.40

The monthly payment is the cash-flow fact to check before borrowing: $773.31 a month is a real deduction from take-home pay for five years, and it continues whether or not your salary does. Miss payments and the loan can be reclassified as a distribution — the schedule is a legal requirement, not a suggestion.

The real cost: five years out of the market

The interest going back to yourself hides the true cost, which is the growth the borrowed money misses while it is out of the account. Run the retirement calculator for a 40-year-old with $80,000 saved, adding $500 a month at a 7% return, and the balance at 45 is $149,206.47. Take $40,000 out as a loan on the same terms and the balance at 45 is $92,501.46 — a gap of $56,705.01, exactly what the borrowed $40,000 would have become on its own at 7% for five years. The missed growth on that $40,000 is $16,705.01.

That $16,705.01 is an upper bound, not the final bill, and the reason matters. The calculation holds the $40,000 out for the full five years, but a real loan pays itself back month by month: each $773.31 repayment re-enters the account and starts compounding again, and the $6,398.72 of interest lands there too. The true cost is smaller than $16,705.01 — but it is not zero, because the money that is out in year one is not compounding in year one, and the repayments only catch up gradually.

The honest comparison is against the alternative you would actually use. If the loan replaces a credit card at 24%, the avoided interest usually dwarfs the missed growth. If it replaces leaving the money invested and paying cash, the loan loses by the missed growth. The calculator cannot make that call — it can only price the growth side, which is the side the 'interest to yourself' pitch leaves out.

The home-buying exception

Loans used to purchase a primary residence escape the five-year deadline. The plan sets the term — often 10 or 15 years, sometimes longer — and the same rules apply otherwise: substantially equal payments, interest to yourself, and the same borrowing limit. The longer term cuts the monthly payment, which is the point: a $40,000 home loan repaid over 15 years costs far less per month than the same loan squeezed into five.

The trade is time out of the market. A 15-year term means the borrowed money is out for 15 years, not five, and the missed-growth arithmetic from the previous section stretches with it. The residence exception is a tool for a down payment, not a cheaper loan — the rate and the limit are unchanged.

Leaving your job is the trap

This is where most 401(k) loans go wrong. Leave your employer — quit, laid off or fired — and most plans accelerate the loan: the full outstanding balance becomes due, often within 60 to 90 days of separation. The exact deadline is in the plan document, and some plans demand it faster. If you cannot repay in time, the unpaid balance is treated as a distribution, called a plan loan offset.

A provision from the Tax Cuts and Jobs Act softens the landing: for a qualified plan loan offset — one caused by leaving the job or the plan terminating — you have until your tax filing deadline, extensions included, for the year the offset occurs, to roll the amount into an IRA or another eligible plan. Leave in 2026 and that generally means until October 15, 2027 with an extension. Miss that window and the balance is taxed as income in the year of the offset, plus a 10% additional tax if you are under 59½.

Put numbers on it: a $30,000 balance still owed at a 22% marginal rate becomes $6,600 of income tax plus $3,000 of penalty — $9,600 in total, due with the return for the year you left. That is the risk to weigh before borrowing: not the interest rate, but the chance you change jobs with a loan outstanding. If a job change is likely within the five years, the loan is a bet on staying put.

Limits and repayment: IRC section 72(p) and IRS Retirement Topics — Plan Loans; job-change rollover window from the Tax Cuts and Jobs Act (qualified plan loan offsets). Figures verified November 17, 2026. For education only — not financial or tax advice.

Running your own numbers

Start with the Retirement Calculator: enter your age, current savings and monthly contribution, then run it twice — once with your full balance and once with the loan amount removed — to see the five-year gap the way this guide did ($149,206.47 versus $92,501.46 at 45). Add the repayment from the schedule above to your monthly budget before borrowing, and check the plan's own loan rules in the Summary Plan Description: whether loans are offered at all, the rate, the minimum, and the deadline if you leave. For the contribution side of the same account, How 401(k) Contributions Work covers the 2026 limits — $24,500, $32,500 at 50+ — and How to Calculate When You Can Retire covers the dates the money is for.

Frequently asked questions

Do I pay tax on a 401(k) loan?

Not if the loan follows the IRS rules: borrow no more than the limit, repay in substantially equal payments at least quarterly, and finish within five years (longer only for a primary residence). Break any of those rules and the outstanding balance becomes a deemed distribution — taxed as income in that year, plus a 10% additional tax if you are under 59½. The loan itself is never reported as income while it stays within the rules. This is educational, not tax advice.

Can I borrow from an IRA?

No. IRAs — traditional, Roth, SEP and SIMPLE — have no loan provision at all. The loan rules apply only to qualified employer plans such as 401(k)s, and even there the plan must choose to offer loans; no employer is required to. A 60-day rollover is the closest IRA equivalent, and it is a once-a-year maneuver with its own deadline, not a loan. This is educational, not tax advice.

What happens to my 401(k) loan if I leave my job?

Most plans accelerate the balance: the full amount still owed becomes due, often within 60 to 90 days, though some plans give longer. If you cannot repay, the unpaid balance is treated as a distribution — a plan loan offset — and you have until your tax filing deadline, extensions included, for that year to roll it into an IRA or another plan. Miss that window and the balance is taxed as income, plus the 10% additional tax if you are under 59½. On a $30,000 balance at a 22% marginal rate that is $6,600 of tax plus $3,000 of penalty. This is educational, not tax advice.

Run the numbers yourself

Project your 401(k) at your target age — run the loan's opportunity cost by comparing the balance with the money in and out.

Retirement Calculator

This guide is educational. Its figures are worked examples computed with the site's own calculators from the rules and tables they cite; they are not financial or tax advice for your situation. Confirm the final figure with your lender, tax authority or a qualified professional before making decisions.

Related guides