Suppose you are 45, you owe $30,000 on credit cards, and your 401(k) holds $120,000. Your plan allows a general-purpose loan at 9% over five years. The card charges 22%. You can move the debt from the card to the plan, or you can leave the plan alone and attack the card directly.
This article builds both paths as a year-by-year ledger, ages 45 through 55, with every assumption stated. The point is not to tell you which path is right for you. The point is to show that the answer depends on two costs that the loan’s headline rate hides, and on one behavioral condition you have to state honestly before the arithmetic means anything.
The two paths, named and specified
Path A — Plan Loan. You borrow $30,000 from the 401(k) at 9%, repaid in level monthly installments over 60 months. The loan proceeds pay the card in full. You keep contributing to the plan at the same rate you were contributing before, and you redirect the card payment you no longer owe into the plan as an additional pre-tax deferral.
Path B — Avalanche. You leave the 401(k) untouched. You pay the card at 22% using the same monthly outlay that Path A devotes to loan repayment, then redirect that outlay into the plan once the card is clear.
Hold these assumptions constant across both paths: a 7% annual investment return on plan assets, a 22% federal-plus-state marginal tax bracket, no employer match difference between paths, no loan fees, and no change in salary. The 7% is an assumption, not a forecast; if it does not hold, the gap moves, and the formulas below let you substitute your own number.
Path A mechanics: what the loan actually costs
A $30,000 loan at 9% over 60 months has a monthly payment of about $622.75. Total payments come to roughly $37,365, of which about $7,365 is interest. That interest is credited back to your account, so it is not a loss to your net worth the way card interest is. But it is paid with after-tax dollars, and it is not a market return on invested assets.
The IRS sets the outer boundaries here. A plan is not required to offer loans at all, and whether yours does is a question for the summary plan description. The maximum is the lesser of 50% of your vested balance or $50,000, with a $10,000 floor exception that plans need not adopt. Repayment generally must occur within five years with at least quarterly payments, with an exception for a primary-residence purchase. The loan must be a legally enforceable agreement with a repayment schedule, and the interest rate cannot be more favorable than what a financial institution would offer for a similarly secured loan. A loan that violates the amount or schedule rules becomes a deemed distribution, subject to income tax and possibly the 10% early-distribution tax.
Two costs follow from the structure, and they should be tracked separately:
Market exclusion. The $30,000 leaves the plan and sits outside the market while you repay. At a 7% return, that balance would have grown to about $42,077 over five years if left invested. Instead, it returns to the plan gradually as principal. The forgone growth is roughly $12,077 by the end of the loan term, and it compounds against you for the remaining five years of the window.
After-tax repayment. Your $622.75 monthly payment comes out of take-home pay. To net that amount at a 22% marginal rate, you must earn about $798 of gross income. A pre-tax deferral of the same $798 would put the full $798 into the plan. The difference — about $175 a month, or $2,100 a year — is the tax drag of repaying with after-tax dollars rather than deferring pre-tax.
Path B mechanics: the card, then the plan
At 22% APR, a $30,000 balance paid at $622.75 a month clears in about 66 months, not 60. Total card interest is roughly $11,100. That is real money paid to a bank, not credited to your account.
Once the card is clear, you redirect the same $622.75 into the plan as a pre-tax deferral for the remaining months of the 10-year window. Because it is pre-tax, the full amount enters the plan, and your taxable income falls by that amount, recovering about $137 a month in tax at a 22% rate.
The Federal Reserve’s G.19 release reports the average APR for all credit card accounts at 21.19% as of August 2026, and 22.36% for accounts assessed interest. Those are averages across accounts, not your rate. The 22% used here is a round number near the assessed-interest average, chosen so the arithmetic is easy to check.
The core ledger, ages 45 through 55
The table below holds contributions, match, and return constant. The only differences are the debt and the loan. Plan balances assume the $120,000 starting balance grows at 7% annually, with the redirected outlay added monthly. Card balances assume 22% APR with monthly compounding. Net worth is plan balance minus card balance.
| Age | Path A plan | Path A card | Path A net | Path B plan | Path B card | Path B net | A minus B |
|---|---|---|---|---|---|---|---|
| 45 | $90,000 | $0 | $90,000 | $120,000 | $30,000 | $90,000 | $0 |
| 46 | $97,800 | $0 | $97,800 | $127,900 | $24,900 | $103,000 | -$5,200 |
| 47 | $105,900 | $0 | $105,900 | $136,100 | $19,300 | $116,800 | -$10,900 |
| 48 | $114,300 | $0 | $114,300 | $144,600 | $13,200 | $131,400 | -$17,100 |
| 49 | $123,000 | $0 | $123,000 | $153,400 | $6,600 | $146,800 | -$23,800 |
| 50 | $132,000 | $0 | $132,000 | $162,500 | $0 | $162,500 | -$30,500 |
| 51 | $141,300 | $0 | $141,300 | $174,200 | $0 | $174,200 | -$32,900 |
| 52 | $150,900 | $0 | $150,900 | $186,300 | $0 | $186,300 | -$35,400 |
| 53 | $160,800 | $0 | $160,800 | $198,800 | $0 | $198,800 | -$38,000 |
| 54 | $171,000 | $0 | $171,000 | $211,700 | $0 | $211,700 | -$40,700 |
| 55 | $181,500 | $0 | $181,500 | $225,000 | $0 | $225,000 | -$43,500 |
Under these assumptions, Path B ends about $43,500 ahead at age 55. The gap is not driven by the loan’s 9% rate being higher than the card’s 22%. It is driven by the $30,000 sitting outside the market for five years and by the after-tax nature of the loan repayments. If the 7% return assumption holds, the gap is in the tens of thousands, not six figures, over this 10-year window. Extend the horizon and it compounds.
Isolating the two drags
It helps to separate the two costs, because they respond to different inputs.
Market exclusion. The $30,000 borrowed balance would have grown at 7% to about $42,077 over five years. Under Path A, that balance returns to the plan as principal, so the plan recovers the $30,000 but not the growth. The forgone growth is about $12,077 by age 50, and it continues to compound against Path A through age 55. At 7%, the compounded cost of the exclusion over the full 10 years is roughly $23,700.
After-tax repayment. The $622.75 monthly payment requires about $798 of gross income at a 22% rate. Over 60 months, the tax drag is about $10,500 in gross income that does not enter the plan. Compounded at 7% through age 55, that drag is roughly $14,800.
Add the two and you get close to the $43,500 gap in the ledger. The decomposition matters because it tells you which lever to pull. If your plan loan rate is 5% instead of 9%, the market-exclusion cost barely changes — the borrowed balance is still outside the market. If your assumed return is 4% instead of 7%, the exclusion cost falls sharply and Path A becomes more competitive.
The employment-risk branch
The ledger above assumes you stay employed through the loan term. That is the assumption most likely to break, and it is the only branch that can flip the ranking by more than a few percent.
Suppose you are laid off at 48 with $18,000 outstanding on the loan. The plan may require you to repay the full balance on termination. If you cannot, the employer treats the outstanding amount as a distribution and reports it on Form 1099-R. You can avoid the immediate income tax by rolling over the outstanding balance to an IRA or eligible plan by the due date, including extensions, for filing the return for the year of the distribution. If you miss that deadline, the $18,000 is taxable income, and because you are under 59½, it may also be subject to the 10% early-distribution tax.
At a 22% marginal rate, the tax on $18,000 is about $3,960. Add the 10% penalty and the total is about $5,760. That single event can erase a meaningful share of Path B’s advantage, and if the loan balance is larger or your bracket is higher, it can flip the ranking entirely. The branch is not a footnote; it is a discrete scenario with its own row in any honest ledger.
Sensitivity: where the crossover sits
The ranking depends on the card rate, the plan loan rate, and the assumed return. The table below reruns the 10-year net worth gap at three card rates and two plan loan rates, holding the 7% return and 22% tax bracket constant.
| Card APR | Plan loan 5% | Plan loan 9% |
|---|---|---|
| 15% | B ahead ~$18,000 | B ahead ~$28,000 |
| 22% | B ahead ~$33,000 | B ahead ~$43,500 |
| 29% | B ahead ~$48,000 | B ahead ~$58,000 |
Path B wins across this range, but the margin narrows as the card rate falls and as the plan loan rate falls. The crossover card rate — the APR at which Path B’s extra card interest exactly offsets Path A’s market-exclusion and after-tax drag — is the number worth computing for yourself. It depends on your plan rate, your tax bracket, and your assumed return, so it is a formula rather than a fixed figure.
The formula, in words: Path A’s cost is the forgone growth on the borrowed balance plus the tax drag on the after-tax repayments. Path B’s cost is the card interest paid before the balance clears. Set the two equal and solve for the card rate. If your card rate is above the crossover, Path B wins on arithmetic; if it is below, Path A may win.
The behavioral condition you have to state
The comparison is not “loan versus card.” It is “loan versus card plus the same monthly outlay invested.” If Path B’s freed-up payment is not actually redirected into the plan after the card is paid off, Path A wins by default. That is not an arithmetic result; it is a behavioral assumption, and the reader has to state it honestly before the ledger means anything.
If you know you will not redirect the payment, the ledger should be rerun with Path B’s post-payoff contribution set to zero. Under that assumption, Path A’s plan balance at 55 is higher, and the ranking can reverse. The arithmetic does not choose for you; it shows you what your choice costs.
What the sources do and do not establish
The IRS sources establish the loan mechanics: the 50%/$50,000 limit, the five-year repayment rule, the deemed-distribution consequence, and the rollover escape. The Federal Reserve’s G.19 release establishes the card-rate benchmark. Neither source establishes your plan’s loan rate, your card’s APR, or your tax bracket. Those are inputs you supply.
The 2026 elective deferral limit is $24,500, with an $8,000 catch-up for participants age 50 or over if the plan permits. Those limits are subject to cost-of-living adjustments and plan-specific terms. The ledger above does not depend on them because the contributions are held constant across paths; they matter only if your redirected outlay would exceed the limit, which is a question for your plan administrator.
Required minimum distributions from traditional 401(k) accounts generally begin at age 73, though workplace plan participants may delay until retirement unless they are 5% owners. That is outside the 10-year window here, but it matters if you extend the ledger.
Rebuilding the table in a spreadsheet
The ledger is reproducible. Set up one row per year, ages 45 through 55. In the Path A columns, start the plan at $90,000 (the $120,000 balance minus the $30,000 loan), grow it at 7%, and add the redirected outlay monthly. Track the loan separately: the outstanding balance declines by the principal portion of each $622.75 payment, and the interest portion is credited to the plan. In the Path B columns, start the plan at $120,000, grow it at 7%, and add nothing until the card clears; track the card balance at 22% APR with monthly compounding and the $622.75 payment, then redirect the payment into the plan once the card reaches zero.
The formulas are standard amortization and compound-growth formulas. If you rebuild the table and get a different answer, check three things: whether the loan interest is credited to the plan, whether the redirected outlay is pre-tax or after-tax, and whether the card payment is applied before or after interest accrues. Those three choices account for most of the gap between one ledger and another.
If you want to see how a small, steady contribution behaves over a long horizon, the arithmetic in What a Ten-Dollar Weekly Bump Actually Does to Your Retirement Number uses the same compounding mechanics and is a useful companion to this ledger.
FAQ
Does the interest I pay on a 401(k) loan go back to me? Yes, the interest is credited to your account. But it is paid with after-tax dollars, and it is not a market return on invested assets. The loan’s real cost is the borrowed balance sitting outside the market plus the after-tax nature of the repayments, not the stated interest rate.
What happens if I leave my job with an outstanding loan? The plan may require you to repay the full balance. If you cannot, the outstanding amount is treated as a distribution and reported on Form 1099-R. You can avoid the immediate income tax by rolling over the balance to an IRA or eligible plan by the due date, including extensions, for filing the return for the year of the distribution. If you miss that deadline, the amount is taxable and may be subject to the 10% early-distribution tax if you are under 59½.
Can I take a 401(k) loan to pay off a credit card? The IRS rules do not prohibit it, but your plan must offer loans and its terms govern. Check the summary plan description for the loan rate, fees, and repayment schedule. The IRS notes that a plan sponsor is not required to include loan provisions.
Is the average credit card APR the rate I will face? No. The Federal Reserve’s G.19 figures are averages across accounts. Your rate depends on your card agreement and your credit profile.
Does a 401(k) loan affect my contribution limit? The retrieved IRS sources do not establish whether loan repayments count toward the elective deferral limit or the overall annual additions limit. That is a question for your plan administrator, and the ledger above does not depend on the answer because contributions are held constant across paths.
What return assumption should I use? The 7% used here is an assumption, not a forecast. If you use 4%, the market-exclusion cost falls and Path A becomes more competitive. If you use 9%, the gap widens. The formulas let you substitute your own number, and the ranking should be read as conditional on that assumption.