Calculators.Life Calculator
Investing

401(k) Loan Calculator

Input Parameters

Scenarios
$
Total balance currently vested in your 401(k) account.
$
The amount you want to borrow. IRS rules cap loans at the lesser of $50,000 or 50% of your vested balance.
%
Interest rate charged on your loan (typically Prime Rate + 1% to 2%), paid back to your own account.
IRS regulations require general 401(k) loans to be repaid within a maximum of 5 years.
%
Estimated annual investment return used to calculate the opportunity cost of uninvested funds.

Computed Results

Payment Per Period
$236.37
Approved Loan Amount$25,000.00
Total Interest Paid to Account$5,727.91
Total Repayment Amount$30,727.91
Estimated Opportunity Cost$10,063.79
IRS Maximum Allowable Loan$40,000.00

The 401(k) loan calculator determines your estimated periodic payments, total interest, and the maximum amount you are eligible to borrow based on standard IRS limits. It also calculates the estimated opportunity cost, helping you understand the potential lost investment growth while the funds are removed from your retirement account.

Disclaimer: This calculator provides mathematical estimates for informational purposes only and does not constitute financial, tax, or legal advice.

Verified Scenario Walkthroughs

To illustrate how loan terms and market returns impact the total cost of borrowing from a 401(k), consider these verified examples:

Moderate Balance with Standard 5-Year Term

If you have a vested balance of $60,000 and request a $20,000 loan at a 7.0% interest rate over 5 years (with 26 bi-weekly payments per year and an expected 8% market return), your payment per period is $182.54. The total interest paid back to your account is $3,730.39. However, the estimated opportunity cost of removing that $20,000 from the market is $9,386.56.

High Balance Hitting IRS Loan Cap

If you have a vested balance of $250,000 and request a $50,000 loan at a 9.5% interest rate over 5 years (with 24 semi-monthly payments per year and an expected 10% market return), your payment per period is $524.24. You will pay $12,908.65 in interest back to your account, and the estimated opportunity cost of the uninvested funds is $30,525.50.

Formula & Explanation

The calculator uses standard IRS limits and amortization formulas to determine your loan parameters and payments.

IRS Maximum Allowable Loan

Standard IRS regulations cap the amount you can borrow. The calculator determines your approved loan amount using this limit:

Maximum Loan = Minimum of $50,000 or (Vested Balance × 0.50)

Opportunity Cost

The opportunity cost estimates the compound growth you miss out on while the funds are not invested in the market:

Opportunity Cost = Approved Loan × ((1 + Expected Market Return)^Years − 1)

How to Use the Calculator

Follow these steps to estimate your 401(k) loan details:

  1. Enter your vested balance: Input the total amount currently vested in your 401(k).
  2. Input the requested loan amount: Enter the amount you wish to borrow. The calculator will cap this at the IRS maximum if necessary.
  3. Set the loan terms: Enter the interest rate and the loan term in years (typically up to 5 years).
  4. Select payment frequency: Choose how often you will make payments (e.g., 26 for bi-weekly).
  5. Estimate market return: Input your expected annual market return to calculate the opportunity cost.

Inputs & Outputs Table

FieldTypeDescription
Vested 401(k) BalanceInputTotal balance currently vested in your 401(k) account.
Requested Loan AmountInputThe amount you want to borrow before IRS limits are applied.
Loan Interest RateInputInterest rate charged on your loan, paid back to your own account.
Expected Annual Market ReturnInputEstimated annual investment return used to calculate opportunity cost.
Payment Per PeriodOutputThe calculated payment amount for each pay period.
Estimated Opportunity CostOutputThe potential investment growth lost during the loan term.
IRS Maximum Allowable LoanOutputThe maximum amount you can borrow based on the 50% or $50,000 rule.

Practical Use Cases

This calculator is useful for evaluating the true cost of borrowing against your retirement savings. While the interest on a 401(k) loan is paid back to your own account, the opportunity cost represents real potential wealth lost because the borrowed funds are no longer compounding in the market. By comparing the total interest paid to the estimated opportunity cost, you can better understand the financial impact of removing funds from your 401(k).

Frequently Asked Questions

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

Under standard IRS rules, you can generally borrow up to 50% of your vested account balance or $50,000, whichever is less.

Where does the interest on a 401(k) loan go?

The interest you pay on a 401(k) loan is deposited directly back into your own retirement account, not paid to a bank or lender.

What is the opportunity cost of a 401(k) loan?

Opportunity cost is the estimated investment growth you miss out on because the borrowed money is removed from the market and is no longer earning returns during the repayment period.

Author portrait
About the Author
Arnab Biswas

Calculator developer and SEO strategist who builds practical online calculators and tests calculation logic, input handling, and expected results using real-world scenarios.