401(k) Loan Calculator

Evaluate your 401(k) loan options with our easy-to-use calculator. Understand how borrowing from your retirement fund affects your future savings and plan your loan repayment accordingly.
Luis GonzalezCreated by Luis GonzalezLast updated:

How to Use This Calculator

  1. 1

    Enter the Loan Amount

    Input the total principal amount you intend to borrow from your 401(k) account, typically up to $50,000 or 50% of your vested balance.

  2. 2

    Specify the Annual Interest Rate

    Provide the annual interest rate for the loan, which is often tied to the prime rate plus 1-2%.

  3. 3

    Define the Loan Term

    Indicate the number of years you plan to take to repay the loan, usually capped at 5 years (or longer for a home purchase).

  4. 4

    Set Payments Per Year

    Enter the frequency of your loan payments, such as 12 for monthly or 26 for bi-weekly payments, aligning with your payroll schedule.

  5. 5

    Review your results

    Examine the Payment Amount, Total Interest Paid, Total Amount Repaid, and Estimated Opportunity Cost. The breakdown bar shows principal vs interest in your total repayment.

Example Calculation

A project manager considers taking a $20,000 401(k) loan at 5% interest to cover unexpected home repairs, aiming to repay it over 3 years with monthly payments.

Loan Amount

$20,000

Annual Interest Rate

5%

Loan Term

3 years

Payments Per Year

12

Results

Payment Amount

$599.42

Total Interest Paid

$1,579.05

Total Amount Repaid

$21,579.05

Estimated Opportunity Cost

$4,500.86

Insights card shows loan analysis with interest-goes-to-you explanation and job change risk warning.

Tips

Consider the Opportunity Cost

Money borrowed from your 401(k) is not invested and growing during the loan term. For a $20,000 loan over 5 years, missing out on an average 7% annual return means foregoing about $8,051 in potential gains — more than the interest you'd pay on the loan itself.

Understand Job Change Risk

If you leave your job, the outstanding 401(k) loan balance typically becomes due within 60 days. If you can't repay it, the balance is treated as an early distribution — subject to income tax and a 10% penalty if you're under 59½.

Compare to External Loans

Before borrowing from your 401(k), compare the total cost (interest + opportunity cost) with alternatives like personal loans or home equity lines of credit. Even a higher-rate external loan may cost less overall because your 401(k) stays invested.

Understanding the Impact of a 401(k) Loan on Your Finances

A 401(k) loan calculator helps individuals evaluate the financial implications of borrowing from their retirement savings.

This tool projects your periodic payment amount, total interest cost, and the opportunity cost of removing funds from your investment portfolio.

Typically, 401(k) loans range up to $50,000, or 50% of the vested balance, whichever is less.

Understanding these costs is vital to ensure the loan aligns with personal financial goals without jeopardizing long-term retirement security.

The Amortization Formula Behind 401(k) Loan Calculations

The calculator uses a standard amortization formula to determine the fixed periodic payment required to repay the loan over a set term.

Each payment covers both a portion of the principal and the accrued interest.

The interest rate is typically set by the plan administrator at the prime rate plus one or two percentage points.

The core formula for calculating the periodic payment (P) is:

P = (L × r × (1 + r)^n) / ((1 + r)^n - 1)

Where: L = Loan Amount (principal) r = Periodic Interest Rate (annual rate ÷ number of payments per year) n = Total Number of Payments (loan term in years × payments per year)

The Estimated Opportunity Cost is calculated as:

Opportunity Cost = Loan Amount × ((1 + 0.07)^Loan Term - 1)

This estimates how much the borrowed amount would have grown at a 7% average market return if left invested.

💡 If you're also planning for retirement contributions, our 401(k) Contribution Calculator can help you project your account growth over time.

Calculating a 401(k) Loan for Home Repairs

Consider a homeowner borrowing $20,000 from their 401(k) at an annual interest rate of 5.0% over a 3-year term with monthly payments.

  1. Determine the periodic interest rate (r): The annual rate is 5.0%, with 12 payments per year. So, r = 0.05 / 12 = 0.00416667.
  2. Calculate the total number of payments (n): 3 years × 12 payments = 36 payments.
  3. Apply the amortization formula: P = (20,000 × 0.00416667 × (1.00416667)^36) / ((1.00416667)^36 - 1) P = (83.3334 × 1.16147) / (0.16147) P ≈ $599.42
  4. Calculate total interest paid: $599.42 × 36 = $21,579.05. Total interest = $21,579.05 - $20,000 = $1,579.05.
  5. Calculate opportunity cost: $20,000 × ((1.07)^3 - 1) = $20,000 × 0.22504 = $4,500.86.

The homeowner's monthly payment is $599.42, with $1,579.05 in total interest and an estimated $4,500.86 in lost investment growth.

💡 For self-employed individuals exploring alternative retirement savings, our SEP IRA Calculator can help estimate contributions and growth.

Retirement Planning Context

Taking a 401(k) loan has significant implications for long-term retirement planning.

While it offers access to funds without a credit check, it disrupts the power of compounding.

For example, borrowing $20,000 for five years means that money is not growing in your account during that period.

With an average annual market return of 7%, you could miss out on about $8,051 in potential growth — often more than the interest paid on the loan.

Furthermore, if you leave your job and cannot repay the loan, the outstanding balance is treated as a taxable distribution and may incur a 10% early withdrawal penalty if you are under 59½.

The IRS contribution limits for 401(k)s are $23,500 for 2026 (plus an additional $7,500 catch-up for those 50 and over), highlighting the importance of keeping contributions invested for long-term growth.

Regulations Governing 401(k) Loans

401(k) loans are governed by the Employee Retirement Income Security Act (ERISA) and IRS Code Section 72(p).

Key rules include:

Frequently Asked Questions

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

You can typically borrow up to 50% of your vested 401(k) balance or $50,000, whichever is less. Some plans have a minimum loan amount of $1,000. Not all 401(k) plans allow loans, so check your plan documents.

What is the interest rate on a 401(k) loan?

The interest rate on a 401(k) loan is typically the prime rate plus 1%, which as of early 2025 is around 8.5%. Unlike other loans, the interest you pay goes back into your own 401(k) account rather than to a bank.

What happens if I default on a 401(k) loan?

If you fail to repay the loan according to the plan terms, the outstanding balance is treated as a distribution. You owe income tax on the full amount, and if you are under 59 and a half, you face an additional 10% early withdrawal penalty.

Can I take a 401(k) loan for a home purchase?

Yes. While most 401(k) loans must be repaid within 5 years, loans used for purchasing a primary residence can have repayment terms up to 15 or even 25 years depending on the plan.

Is a 401(k) loan better than a personal loan or credit card?

A 401(k) loan typically has a lower interest rate than credit cards or unsecured personal loans, and the interest goes back to your own account. However, the hidden cost is lost investment growth, double taxation on interest, and the risk of default if you leave your job.