A 401(k) loan lets you borrow the lesser of $50,000 or half of your vested balance from your own account and repay it, with interest, through payroll over up to five years. Nothing is taxed as long as you keep paying, but any balance still owed when you leave the job, or when you stop paying, becomes a taxable distribution. That second rule is why, for most people within a few years of retirement, cash or a taxable account is the better source of money.
At a glance
Most you can borrow
$50,000 or 50%
Whichever is less; a plan may allow up to $10,000 on small balances
12-month look-back
Reduces the cap
$50,000 minus the highest balance owed in the past year, less what you owe today
Repayment
5 years
At least quarterly, level payments; longer only for buying a principal residence
Stop paying while employed
Taxable
After a cure period ending the next calendar quarter; 10% extra before 59½; cannot be rolled over
Leave the job with a balance
Tax-return deadline
Roll the offset amount into an IRA by your filing due date, including extensions, or it is taxed
IRA loans
Not allowed
Borrowing from an IRA is a prohibited transaction; only employer plans lend
How Does a 401(k) Loan Work, and How Much Can You Borrow?
The plan sells investments in your account, lends you the cash, and holds a promissory note as one of your account's assets. You repay principal and interest into your own account, usually by payroll deduction. Because the tax code treats the loan as a distribution unless it meets a short list of conditions in section 72(p), those conditions are the rules that matter (26 U.S.C. 72(p)).
The amount. Your total plan loans cannot exceed the lesser of two figures. The first is $50,000, reduced by the amount by which your highest outstanding loan balance during the 12 months before the new loan exceeds what you owe on the day you take it. The second is the greater of half your vested balance or $10,000 (26 U.S.C. 72(p)(2)(A); IRS). The $10,000 floor only helps people with small balances, and plans are not required to offer it. The 12-month look-back is the rule most people miss: paying off one loan and immediately taking a new one does not reset you to $50,000.
| Situation | Maximum new loan |
|---|---|
| Vested balance $16,000, no other loans | $10,000 if the plan allows the floor; otherwise $8,000 |
| Vested balance $60,000 | $30,000 |
| Vested balance $100,000 or more | $50,000 |
| $820,000 vested; a $30,000 loan paid off four months ago | $20,000 |
| $820,000 vested; owe $15,000 today, owed $22,000 at the high point in the past year | $28,000 |
Last row: the cap is $50,000 minus ($22,000 − $15,000) = $43,000 of total loans. With $15,000 already owed, the new loan can be $28,000.
The term. The loan must be repaid within five years in substantially level installments, paid at least quarterly. The only exception to the five-year limit is a loan used to buy a home that will be your principal residence; plans set their own longer term for those (72(p)(2)(B) and (C)). Refinancing an existing mortgage does not count as buying a residence (26 CFR 1.72(p)-1, Q&A-8). A plan may suspend payments for up to a year during an unpaid leave of absence, and for the period of military service (IRS).
The plan's own rules. A plan does not have to offer loans at all, may limit the number outstanding, and may require your spouse's written consent (IRS). The plan sets the interest rate, which must be reasonable, and may charge an origination or annual fee. There is no credit check, and the loan does not appear on your credit reports (Equifax). You cannot deduct the interest; section 72(p)(3) specifically denies a deduction for loans secured by elective deferrals, which covers most 401(k) loans.
IRAs cannot lend. Borrowing money from an IRA, or using it as security for a loan, is a prohibited transaction that can disqualify the account (IRS Publication 590-B). If you have already rolled old plans into an IRA, the only 401(k) you can borrow from is your current employer's. The short-term "60-day rollover loan" some people improvise from an IRA is limited to one IRA-to-IRA rollover in any 12 months, and missing the 60 days makes it a taxable withdrawal.
| Amount borrowed | Monthly payment | Total interest (paid to your account) |
|---|---|---|
| $10,000 | $203 | $2,166 |
| $25,000 | $507 | $5,415 |
| $40,000 | $811 | $8,663 |
| $50,000 | $1,014 | $10,829 |
What Does a 401(k) Loan Really Cost?
The cost is the difference between what the borrowed money would have earned in your investments and the interest you pay yourself. The interest is not a cost in the usual sense, because it goes back into your own account. If your funds would have returned 12% while you paid yourself 8%, the loan cost you 4 points a year on the borrowed amount. If the market fell 15% that year, the loan was the best-performing asset you owned.
The double-tax myth, precisely. Many articles say 401(k) loan interest is "taxed twice." The mechanics are correct: you repay from after-tax pay, and the interest you pay becomes part of a pre-tax account that is taxed again when withdrawn. The conclusion drawn from it is not. Compare two ways to borrow $40,000 for five years at 8%, assuming your 401(k) investments would also earn 8%:
| Bank loan, 401(k) untouched | 401(k) loan | |
|---|---|---|
| Monthly payment, from after-tax pay | $811 | $811 |
| Where the interest goes | The bank | Your 401(k) |
| This slice of the 401(k) after five years (pre-tax) | $59,594 | $59,594 |
The outcomes are identical. In the bank case, the $40,000 stays invested and grows to $59,594, all taxed when withdrawn. In the loan case, your payments rebuild the same $59,594, also taxed when withdrawn. The interest you paid "twice" simply replaces investment growth that would have been taxed once anyway. What is true is narrower: the interest is paid with after-tax dollars, just as it would be to a bank. Do not let the double-tax argument decide the question. The loan rate against the forgone return, and the risk that the job ends first, should decide it.
Two costs that are real. First, many people cut or stop their contributions while repaying. In 2026 the 401(k) limit is $24,500, or $32,500 with the age-50 catch-up and $35,750 at ages 60 to 63. Losing a year of those deferrals, and any employer match, costs more than almost any loan. Our guide to maxing out a 401(k) covers the catch-up rules. Second, the loan is repaid from take-home pay; if that squeezes the budget, the risk of a default rises.
What Happens If You Miss Payments?
The unpaid balance becomes taxable income, but not immediately. The plan may allow a cure period that runs until the last day of the calendar quarter after the quarter in which you missed a payment. Miss a payment due in February, and you have until September 30 to catch up. If you do not, the whole outstanding balance, with accrued interest, is a deemed distribution (26 CFR 1.72(p)-1, Q&A-10).
A deemed distribution is unpleasant in four specific ways:
- •It is taxed as ordinary income in the year it occurs, and the 10% additional tax applies if you are under 59½ (Q&A-11).
- •It cannot be rolled over. Unlike an offset when you leave the job, there is no way to put the money back and undo the tax (Q&A-12). The plan reports it on Form 1099-R with code L (IRS).
- •The loan does not disappear. It still counts as outstanding when the plan works out how much you can borrow later (Q&A-19).
- •The rule of 55 does not help. That exception applies only to distributions after you separate from service. A default while you are still on the payroll at 57 carries the 10% tax; the same balance offset after you leave at 57 does not.
If you repay a deemed loan later, the repayments become after-tax basis in the plan, so the same dollars are not taxed a second time when withdrawn (Q&A-21). Keep the records.
What Happens to a 401(k) Loan When You Leave the Job or Retire?
Most plans require the balance to be repaid when you leave; whatever is unpaid is subtracted from your account (IRS). That subtraction is a plan loan offset, and unlike a deemed distribution it is an actual distribution that can be rolled over (IRS). A few plans let former employees keep paying by bank transfer; ask before you give notice.
The extended deadline. Since 2018, when the offset happens because you left the job (or the plan terminated), and within 12 months of leaving, it is a qualified plan loan offset. You can roll the offset amount into an IRA or another plan, using other money, until your tax-return due date for that year, including extensions. If you file on time without an extension, an automatic six-month extension still applies, which puts the practical deadline at about October 15 of the following year (IRS). Offsets that do not qualify, for example one made more than 12 months after you leave, get the ordinary 60 days. The plan marks a qualified offset with code M on Form 1099-R (IRS); tell the IRA custodian that the deposit is a loan-offset rollover so it is reported correctly.
If you do not roll it over, the offset is taxable income in the year you left. The 10% additional tax applies before 59½ unless you separated from service in or after the calendar year you turned 55 (IRS). Because the income lands in your final working year, it is often taxed at your highest marginal rate. And at 63 or later, a large offset raises the income Medicare uses two years later to set IRMAA surcharges.
Keep paying on schedule
Loan stays in good standingNo tax
No taxMiss payments while still employed
Cure period ends the next calendar quarter
Deemed distribution (code L)Taxable; 10% extra before 59½
Cannot be rolled over; rule of 55 does not apply
Taxed, no fixLeave the job and repay in full
Loan closed before the offsetNo tax
No taxLeave the job with a balance
Deposit the same amount in an IRA
Qualified plan loan offset (code M)No tax if rolled over
Deadline: tax-return due date, including extensions
DeadlineLeave the job with a balance, no rollover
Qualified plan loan offset (code M)Taxable in the year you leave
No 10% if 59½, or if you left in or after the year you turned 55
Taxed
The same unpaid balance is either fixable (an offset after leaving) or not (a default while employed). The difference is whether you still work there.
Rolling over the rest of the account follows its own rules, covered in our guide to rolling over a 401(k) to an IRA. One interaction matters here: the rule of 55 applies only to money left in the plan. If you are between 55 and 59½ and need cash to repay the loan, a withdrawal from the plan escapes the 10% tax; the same withdrawal after rolling to an IRA does not.
401(k) Loan vs. Hardship Withdrawal, and Other Ways to Raise Cash
A loan is temporary and untaxed if repaid; a hardship withdrawal is permanent and taxed. Hardship withdrawals are limited to an "immediate and heavy financial need," with a safe-harbor list that covers medical care, buying a principal residence (not mortgage payments), tuition, preventing eviction or foreclosure, funeral costs and certain home repairs after a casualty. They are taxable, may carry the 10% additional tax, and cannot be repaid or rolled over. Since 2019 plans can no longer require you to take a loan first (IRS).
SECURE 2.0 added a smaller option: one emergency personal expense distribution per calendar year, up to the lesser of $1,000 or your vested balance above $1,000, free of the 10% tax though still taxable (IRS). You may repay it within three years; if you do not, you cannot take another from that plan for three calendar years (IRS Notice 2024-55). It is a useful safety valve, but $1,000 does not solve a large problem.
For readers past 59½, the most overlooked choice is an ordinary in-service withdrawal. Many plans permit one once you reach 59½, with no 10% tax and no repayment schedule. It is taxable, so it suits a need you would otherwise fund by withdrawing later anyway.
| Source | Income tax | 10% extra before 59½ | Must repay? | Main risk |
|---|---|---|---|---|
| 401(k) loan | None if repaid | Only on default or offset | Yes, 5 years | Job ends first |
| Hardship withdrawal | Yes | Yes, unless an exception applies | Cannot | Permanent loss of tax deferral |
| Emergency distribution ($1,000) | Yes | No | Optional, 3 years | Too small for most needs |
| In-service withdrawal after 59½ | Yes | No | No | Higher taxable income that year |
| Sell from a taxable account | Capital gains only | No | No | Gives up a step-up at death on sold shares |
| Home equity line (HELOC) | No | No | Yes, variable rate | Rate rises; the home secures it |
| Securities-based line or margin | No | No | Interest only, on demand | Forced sale if markets fall |
HELOC. Rates are usually variable, and the interest is deductible only if you itemize and the money bought, built or substantially improved the home that secures it (IRS Publication 936). It is a sensible standby line for a homeowner with a paid-off house; opening one while you still have a salary is far easier than after you retire. For owners 62 and older, a reverse mortgage line of credit is a different tool with no required payments, explained in our guide to how reverse mortgages work.
Securities-based lines and margin.For readers with large taxable portfolios, a line of credit secured by the portfolio is fast and usually cheaper than a personal loan, with no fixed repayment. The risk is the mirror image of a 401(k) loan's: if the portfolio falls, the lender can demand more collateral or sell holdings at the worst moment. Keep any balance small relative to the collateral.
Cash reserves. The reason most people borrow from a 401(k) is that the emergency fund was not there. Our emergency fund guide covers how much to hold as you approach retirement, when a year or two of spending in cash does double duty as a buffer against selling in a downturn.
Should You Use a 401(k) Loan to Buy a House or Pay Off Debt?
For a house, it can work as a short bridge, rarely as long-term financing. The law allows a longer term for a loan used to buy your principal residence, but the loan still comes due when you leave the job, so a 15-year residence loan taken at 60 is a taxable offset waiting to happen. The more common use at our readers' stage is buying the next home before the current one sells: borrow for the down payment, then repay in full from the sale proceeds a few months later. That works if the sale is reasonably certain and you will stay employed until it closes. Our guide to downsizing in retirement covers the sale side. Note also that the IRA exception for first-time homebuyers does not apply to 401(k) withdrawals (IRS).
For debt, a 401(k) loan replaces a high rate paid to a lender with a lower rate paid to yourself, which is attractive on paper. It fails in practice for two reasons. The loan must be repaid in five years or less even if the original debt had a longer schedule, which raises the monthly payment. And if the underlying spending is not fixed, the credit card or line fills up again and you owe both. If you still carry consumer debt near retirement, list every balance and rate in the debt payoff calculator first; it often shows that directing cash flow at the highest rate clears it within a year or two without touching the 401(k).
Worked Example: Carol Clears a $40,000 HELOC
A hypothetical person
Carol is not a real person. The arithmetic uses 2026 federal brackets for a single filer with the standard deduction (Revenue Procedure 2025-32), assumes an 8% plan loan rate, and ignores state tax. This is education, not tax advice.
Carol is 58, widowed, and a senior manager earning $165,000. She defers the age-50 maximum of $32,500 into her 401(k), which holds $820,000, all vested. She has $260,000 in a taxable brokerage account and $6,000 a year of dividends and interest. Two years ago she drew $40,000 on a home equity line for a new roof and kitchen; the rate has floated up to 8.5%, about $3,400 a year. She takes the standard deduction, so the interest saves her no tax. She plans to retire at 60.
Two ways to pay off the HELOC
| Sell from brokerage | 401(k) loan | |
|---|---|---|
| Cash raised | $40,000 | $40,000 |
| Federal tax now | $1,800 on a $12,000 gain | $0 |
| Monthly payment from pay | $0 | $811 for 5 years |
| Interest over the full term | $0 | $8,663, to her own account |
| Balance owed when she retires at 60 | $0 | $25,882 |
Selling from the brokerage account. The shares she sells have a cost basis of $28,000, so the gain is $12,000. Her taxable income is about $122,400 ($138,500 of income less the $16,100 standard deduction), in the 24% bracket, so the gain is taxed at 15%: $1,800. Her income is below the $200,000 threshold for the net investment income tax. The HELOC is gone, the payoff earns a certain 8.5%, and nothing is left to go wrong.
The 401(k) loan. She borrows $40,000 at 8% over five years and pays $811 a month by payroll deduction. She avoids the $1,800 capital gains tax and keeps her brokerage account intact. She keeps deferring the full $32,500, so the only investment cost is the difference between her funds' return and the 8% she pays herself.
Then she retires at 60, as planned. After 24 payments totaling $19,465, she still owes $25,882. Her plan requires repayment at separation, and the balance is offset. She is over 59½, so no 10% tax applies. She has three choices:
- •Repay before her last day. She writes a check for $25,882, most likely from the brokerage account.
- •Roll the offset over. She deposits $25,882 of other money into a rollover IRA by October 15 of the following year. No tax is due. The money again most likely comes from the brokerage account.
- •Let it be taxed. In her retirement year she earns $70,000 after deferrals, plus $6,000 of investment income, for taxable income of about $59,900, in the 22% bracket. The $25,882 offset adds $5,694 of federal tax.
What the loan bought her. Two years of deferral on a sale she ends up making anyway, and a deadline she has to manage in the most crowded financial year of her life. The $1,800 she saved on capital gains is real but small. If she lets the offset be taxed instead, $25,882 leaves tax deferral for good and costs $5,694 of federal tax in her final working year, on money she could otherwise have withdrawn or converted later on her own schedule.
Two variations change the answer sharply. If a layoff at 57 had triggered the offset, the rule of 55 would still spare her the 10% tax, because she separated in or after the year she turned 55. But if she had stopped paying at 58 while still employed, the $25,882 balance would have been a deemed distribution: taxed at her 24% rate, plus $2,588 of additional tax, with no rollover to undo it.
The fair case for the loan. If Carol's brokerage shares had a very low basis and she intended to hold them for life, selling would give up the step-up in basis her heirs would otherwise receive. A 401(k) loan she repays from salary well before retiring avoids that. For her, with a two-year runway, the sale is cleaner. The 401(k) calculator shows how the balance projects to retirement with and without contributions, a useful check if repaying would tempt you to cut them.
When Does a 401(k) Loan Make Sense Near Retirement?
Rarely, and in each case because the loan is short and the repayment source is known in advance:
- •A bridge between two homes. You buy before you sell and repay the loan from the sale within months, while still employed.
- •A short gap in liquidity. A large bill arrives weeks before a bonus, a certificate of deposit matures, or an inheritance settles, and the alternative is selling in a falling market or paying a high rate.
- •Protecting low-basis shares you plan to hold. Selling realizes gains that a step-up at death would erase; a loan repaid from salary avoids that, provided the job will outlast the loan.
- •Keeping income down in a sensitive year. A sale that would push income over an IRMAA or health-subsidy threshold may be worse than a short loan, if the loan will be repaid before you leave.
In every other case, especially when retirement is less than five years away, when the job is not secure, or when the money would pay for ongoing spending, use cash, a taxable account, or a withdrawal you have planned for. Our guide to which accounts to draw from first sets out the order that keeps lifetime taxes down.
What to Do, in Order
- 1Try the other sources first. Cash, a taxable account, or (after 59½) an in-service withdrawal. Borrow from the 401(k) only if they are worse.
- 2Read the plan's loan policy. The interest rate, fees, how many loans are allowed, whether a spouse must consent, and above all what happens when you leave: the repayment deadline and whether former employees can keep paying.
- 3Work out your limit, including the 12-month look-back. $50,000 minus your highest balance in the past year, less what you owe now; never more than half your vested balance.
- 4Compare the term with your working years. If you might retire, or could be laid off, before the loan is repaid, decide now where the payoff will come from.
- 5Keep contributing. Do not reduce deferrals to afford the payment; the lost contributions and match usually cost more than the loan saves.
- 6If you miss a payment, catch up before the quarter after next ends. After the cure period the balance is a deemed distribution that cannot be undone.
- 7Before your last day, repay if you can. Ask the plan for a payoff figure. It is the only route with no deadline to track.
- 8If the balance is offset, roll it over by the deadline. Deposit the same amount into an IRA or new plan by your tax-return due date, including extensions (about October 15 of the following year), and tell the custodian it is a loan-offset rollover.
- 9Check the Form 1099-R. Code M means a qualified offset you can roll; code L means a deemed distribution you cannot. Report any rollover on your return.
Common Mistakes
- •Taking a five-year loan two years before retiring. The balance is offset at separation and taxed unless you find the money to roll over.
- •Assuming the rule of 55 covers a default. It applies to distributions after you leave. A deemed distribution while you are still employed carries the 10% tax before 59½.
- •Assuming you have only 60 days after an offset. A qualified offset can be rolled over until your tax-return due date, including extensions. The reverse mistake is worse: a deemed distribution cannot be rolled over at all.
- •Rolling the whole account to an IRA before dealing with the loan. The offset happens anyway, and once the money is in the IRA you lose the plan's rule-of-55 access to repay it penalty-free.
- •Refinancing into a new loan to reset the limit. The 12-month look-back counts the highest balance you owed in the past year.
- •Using a hardship withdrawal to pay off debt. Debt repayment is not on the safe-harbor list, and the withdrawal is taxed and cannot be repaid.
- •Stopping contributions to fund the payment. At 60 to 63 that can mean giving up deferrals of up to $35,750 a year.
- •Deciding on the double-tax argument. The interest is not an extra tax compared with borrowing elsewhere; the decision turns on the rate, the forgone return and the job.
- •Paying off a credit line and leaving it open and in use. The loan then adds to the debt instead of replacing it.
Frequently Asked Questions
Is it a good idea to take a loan from your 401(k)?
Usually not in your late 50s or 60s. The loan is cheap to set up and has no credit check, but a 5-year repayment schedule often outlasts the job, and an unpaid balance becomes taxable when you leave. If you have cash or a taxable brokerage account, using them is almost always simpler. A 401(k) loan makes most sense as a short bridge (for example between buying a new home and selling the old one) when you are confident you will stay employed until it is repaid.
What is the monthly payment on a $50,000 401(k) loan?
At an 8% interest rate over five years, $1,014 a month, or about $468 every two weeks if repaid by payroll deduction. Total interest over the five years is about $10,829, all of it paid into your own account. Your plan sets the actual rate; the loan documents state it.
What happens to my 401(k) loan if I quit, am laid off, or retire?
Most plans require the balance to be repaid when you leave. Whatever is unpaid is subtracted from your account (a plan loan offset) and treated as a distribution. You can avoid the tax by depositing the same amount into an IRA or another plan by the due date of your tax return for that year, including extensions. Otherwise it is taxable income, plus a 10% additional tax if you are under 59 and a half, unless you left the job in or after the year you turned 55.
What happens if I stop repaying a 401(k) loan while I still work there?
The plan can give you until the end of the calendar quarter after the quarter in which you missed a payment to catch up. After that, the outstanding balance is a deemed distribution: taxable income that year, and subject to the 10% additional tax if you are under 59 and a half. A deemed distribution cannot be rolled over, and the loan still counts against how much you can borrow in the future.
Is 401(k) loan interest taxed twice?
Only in a narrow sense that does not cost you anything extra. You repay the loan and its interest from after-tax pay, and the interest is taxed again when you eventually withdraw it. But if you borrowed from a bank instead, you would also pay interest from after-tax pay, and the 401(k) money left invested would be taxed when withdrawn. At the same interest rate and investment return, the two routes leave you with the same balance. The real cost of a 401(k) loan is the gap between what the money would have earned and the rate you pay yourself.
Should I take a 401(k) loan or a hardship withdrawal?
A loan, if you can repay it before you plan to leave the job. A hardship withdrawal is permanent, taxable, may carry the 10% additional tax before 59 and a half, and cannot be repaid or rolled over. Hardship withdrawals are also limited to specific needs such as medical bills, buying a principal residence, preventing eviction or foreclosure, and funeral costs; paying off a credit card or home equity line is generally not one of them. After 59 and a half, many plans allow an ordinary in-service withdrawal instead.
Will my employer know if I take a 401(k) loan? Will it affect my credit?
Your employer will usually know, because repayments come out of your paycheck, but the plan does not ask why you are borrowing for a general-purpose loan. There is no credit check, and the loan does not appear on your credit reports or affect your credit scores, according to Equifax.
Can I pay off a 401(k) loan early?
Most plans allow early repayment in full, and many allow extra payments, without penalty. Ask the plan administrator for a payoff amount and the accepted payment method. Paying the loan off before your last day at work is the simplest way to avoid a taxable offset when you retire.
The Bottom Line
A 401(k) loan is a reasonable tool for a worker with years of employment ahead and a short, well-defined need. In your late 50s and 60s, the loan's term tends to outlast the job, and the balance becomes taxable income in the year you retire unless you find the money to roll it over. If you have a taxable account or cash, use it. If you do borrow, know your repayment source before you sign, keep contributing, and treat the tax-return deadline for an offset as seriously as any other. Current contribution limits and brackets are collected on our retirement numbers page.
Clear the Debt Without Touching the 401(k)
List your balances and rates and see how quickly cash flow alone pays them off, or project your 401(k) to retirement with full contributions. Free, no sign-up.