{
  "id": "401k-loan",
  "version": "5bda0ebffe28",
  "status": "published",
  "name": "401k Loan Calculator",
  "question": "What is my 401k loan payment?",
  "summary": "Computes the most you can borrow from a 401(k) under the IRS limits, the level payment per paycheck at your plan’s rate, the interest you pay back into your account, and the payment schedule.",
  "category": "finance",
  "subcategory": "retirement",
  "url": "https://www.acalculator.org/finance/401k-loan-calculator",
  "markdown": "https://www.acalculator.org/finance/401k-loan-calculator.md",
  "kind": "schedule",
  "method": "Limit = min($50,000 − (highest balance in 12 months − current balance), max($10,000, vested ÷ 2), vested) − current balance; payment = P·r ÷ (1 − (1 + r)^−n) with r = rate ÷ payments per year and n = years × payments per year.",
  "assumptions": [
    "The IRS limits under IRC 72(p); your plan may lend less or not at all, and may not use the $10,000 rule.",
    "A loan never exceeds your vested balance.",
    "Level payments each period with interest on the unpaid balance; the last payment clears the balance.",
    "The rate is the one your plan charges (type it); no live rates."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "vested": {
        "title": "Vested balance",
        "description": "The part of your 401(k) balance that is yours to keep.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 100000000
      },
      "amount": {
        "title": "Loan amount",
        "description": "How much you want to borrow.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 1,
        "maximum": 50000
      },
      "rate": {
        "title": "Interest rate",
        "description": "The yearly rate your plan charges, often the prime rate plus 1 or 2 points.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 30
      },
      "years": {
        "title": "Repayment term (years)",
        "description": "Up to 5 years, or longer for a loan to buy your main home.",
        "type": "integer",
        "minimum": 1,
        "maximum": 30
      },
      "per": {
        "title": "Payments per year",
        "description": "How often you repay, usually by payroll deduction each paycheck.",
        "type": "string",
        "enum": [
          "12",
          "24",
          "26",
          "52"
        ]
      },
      "home": {
        "title": "Loan to buy my main home",
        "description": "A loan to buy your principal residence may be repaid over more than 5 years.",
        "type": "boolean"
      },
      "owe": {
        "title": "Plan loans you owe now",
        "description": "The balance of any loans you already have from the plan. Leave empty for none.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 50000
      },
      "high": {
        "title": "Highest loan balance in the last 12 months",
        "description": "The highest you owed the plan at any time in the past 12 months. Leave empty for none.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 50000
      }
    }
  },
  "outputs": {
    "payment": {
      "label": "Payment per paycheck",
      "description": "The level payment each period.",
      "format": "money"
    },
    "limit": {
      "label": "Most you can borrow now",
      "description": "The IRS limit for a new loan, less what you already owe the plan.",
      "format": "money"
    },
    "interest": {
      "label": "Total interest",
      "description": "All the interest, which goes back into your 401(k).",
      "format": "money"
    },
    "total": {
      "label": "Total repaid",
      "description": "Loan amount + total interest.",
      "format": "money"
    },
    "count": {
      "label": "Number of payments",
      "description": "Years × payments per year.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "vested": 60000,
      "amount": 20000,
      "rate": 8.5,
      "years": 5,
      "per": "26",
      "home": false
    },
    "outputs": {
      "payment": 189.0948245208935,
      "limit": 30000,
      "interest": 4582.32718771615,
      "total": 24582.32718771615,
      "count": 130
    },
    "text": "You repay $189.09 per paycheck, 130 payments, with $4,582.33 of interest back into your account."
  },
  "examples": [
    {
      "given": {
        "vested": 40000,
        "amount": 20000,
        "rate": 8.5,
        "years": 5,
        "per": "12",
        "home": false
      },
      "expect": {
        "limit": 20000,
        "payment": 410.3306265410252,
        "count": 60
      },
      "source": "IRS, Retirement Plans FAQs regarding Loans (the lesser of the greater of $10,000 or 50% of the vested balance, or $50,000; $40,000 vested gives $20,000; repay within 5 years, at least quarterly, in substantially equal payments), https://www.irs.gov/retirement-plans/retirement-plans-faqs-regarding-loans; payment P·r ÷ (1 − (1 + r)^−n), r = 0.085 ÷ 12, n = 60",
      "tolerance": 1e-9
    },
    {
      "given": {
        "vested": 150000,
        "amount": 50000,
        "rate": 7,
        "years": 5,
        "per": "26",
        "home": false
      },
      "expect": {
        "limit": 50000,
        "payment": 456.3536417947045,
        "count": 130
      },
      "source": "IRS, Retirement Plans FAQs regarding Loans ($50,000 maximum), https://www.irs.gov/retirement-plans/retirement-plans-faqs-regarding-loans; IRC 72(p)(2); payment with r = 0.07 ÷ 26, n = 130",
      "tolerance": 1e-9
    },
    {
      "given": {
        "vested": 100000,
        "amount": 10000,
        "rate": 0,
        "years": 1,
        "per": "12",
        "home": false,
        "owe": 10000,
        "high": 30000
      },
      "expect": {
        "limit": 20000,
        "payment": 833.3333333333334,
        "interest": 0
      },
      "source": "IRS, Retirement Plans FAQs regarding Loans ($50,000 reduced by the highest outstanding balance in the preceding 12 months minus the current balance; a new loan plus outstanding loans cannot exceed the maximum), https://www.irs.gov/retirement-plans/retirement-plans-faqs-regarding-loans; hand calculation in content.mdx"
    }
  ],
  "sources": [
    "IRS, Retirement Plans FAQs regarding Loans (a plan may permit loans up to the lesser of the greater of $10,000 or 50% of the vested account balance, or $50,000 reduced by the highest outstanding balance in the preceding 12 months minus the current balance; $40,000 vested allows $20,000; repay within 5 years unless the loan buys a principal residence; substantially equal payments of principal and interest at least quarterly; a new loan plus outstanding loans cannot exceed the maximum). https://www.irs.gov/retirement-plans/retirement-plans-faqs-regarding-loans (retrieved 2026-10-02)"
  ],
  "related": [
    "401k",
    "401k-early-withdrawal",
    "loan",
    "retirement"
  ],
  "changelog": []
}
