Borrowing from your own 401(k) isn't automatically a bad idea. A retirement-industry discussion published this week made the case that a plan loan can work like a fixed-income holding in your portfolio: you repay principal and interest to your own account instead of a bank, often at a lower cost than a credit card or personal loan.

That reasoning assumes you'll still be drawing a paycheck when the bill comes due. Retirement changes that assumption, because most plans treat your last day of work as the day the full remaining balance comes due, not the original repayment schedule you signed up for.

Where are you with your loan right now? Choose the situation closest to yours. I have a 401(k) loan and I'm still working: You're continuing to make payroll-deducted payments on schedule. I'm retiring soon and still owe a balance: You have a loan balance and a retirement date already in mind. I already retired and still have a balance: You've already separated from your employer and the loan wasn't settled. The order below applies to the option that fits your situation, starting with the step that matters most right now.

How Much You Can Borrow and How Long You Have to Repay It

Plans that allow loans generally cap them at the lesser of 50% of your vested balance or $50,000. If 50% of your balance is under $10,000, some plans let you borrow up to $10,000 anyway.

You generally have five years to repay the loan, with payments due at least quarterly. The one common exception stretches the term longer if you used the loan to buy your primary home.

Confirm the basics of your own loan Don't assume; ask your plan administrator directly. Ask your plan administrator for your exact outstanding balance and your per-paycheck payment amount. Confirm your original repayment term and whether it was the standard 5 years or a longer home-purchase term. Check whether your plan allows a lump-sum payoff without a penalty.

What Happens to the Loan the Day You Retire

Most plans require the full outstanding balance to be repaid immediately once you separate from your employer, whether that's a retirement, a layoff, or a job change. Few retirees have that amount sitting in cash on short notice.

If you can't repay it, the plan treats the unpaid balance as a distribution and reports it to the IRS on Form 1099-R. That amount becomes ordinary taxable income for the year, and if you're under 59 1/2, the IRS can add its usual early withdrawal penalty on top.

If you're setting a retirement date Get the payoff details in writing before you pick the date. Ask your plan whether the balance is due on your last day or at the end of that pay period. Get the exact dollar payoff amount in writing before you set a retirement date. Decide now whether you'll pay it off, roll it over, or accept the tax hit, so retirement day isn't the first time you're deciding.

Calculator

See what an unpaid balance would add to your taxable income

This is a rough estimate, not a tax filing. Use it to weigh the cost of letting your balance go unpaid.

Example amounts are hints, not prefilled values. Fields stay blank until you enter them.

Enter your numbers to see the total.

If this is just one piece of a bigger pre-retirement to-do list, 12 Months Until You Retire? Here's the Order to Do Things In walks through the rest.

The Payoff Order Before Your Last Day

You generally have three ways to settle an outstanding balance at retirement: pay it off in cash before you leave, roll the outstanding amount into an IRA using money from savings, or let it become taxable income. Work through them in that order.

Each option closes off as you move down the list, so check the first one seriously before assuming it's out of reach.

Work through these in order Check off each step as you settle it. First choice: Pay the balance off in cash if you can. This avoids taxes, a penalty, and paperwork entirely, and it's worth checking your savings before ruling it out. Second choice: Roll the outstanding amount into an IRA. You generally have until your tax filing deadline, including extensions, for the year you separate to do this. The money has to come from somewhere else, since the original loan cash is already spent. Last resort: Let it become taxable income. This is the default if you do nothing, and it's usually the most expensive option once taxes and a possible penalty are added up.

If a rollover is the direction you're headed, read Should You Do a Roth Conversion Before You Retire? before you move the money, since where it lands matters.

Common questions

What happens to my 401(k) loan when I retire?

Most plans require you to repay the full outstanding balance as soon as you separate from your employer, including through retirement. If you can't repay it, the plan reports the unpaid amount to the IRS as a distribution, and it becomes taxable income for the year, plus a possible early withdrawal penalty if you're under 59 1/2.

Can I roll over an unpaid 401(k) loan balance to avoid taxes?

Generally yes. You can roll the outstanding balance into an IRA or another eligible retirement plan by your tax filing deadline, including extensions, for the year you separate from your employer. The money for that rollover has to come from savings or another source, since the original loan proceeds are already spent.

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

Plans that allow loans generally cap them at the lesser of 50% of your vested balance or $50,000, with some plans allowing up to $10,000 even if 50% of your balance is lower than that. Repayment is generally due within five years, with an exception for loans used to buy a primary home.