{
  "id": "interest-rate",
  "version": "bf80296c5985",
  "status": "published",
  "name": "Interest Rate Calculator",
  "question": "What is my interest rate?",
  "summary": "Finds the yearly interest rate of a loan from the amount borrowed, the payment and the number of payments, or solves for the payment, the term or the amount.",
  "category": "finance",
  "subcategory": "investing",
  "url": "https://www.acalculator.org/finance/interest-rate-calculator",
  "markdown": "https://www.acalculator.org/finance/interest-rate-calculator.md",
  "kind": "function",
  "method": "Loan × (1 + i)^N = payment × (1 + i × t) × ((1 + i)^N − 1) ÷ i + balance left, solved for the rate per period i by search; the yearly rate is 100 × C/Y × ((1 + i)^(P/Y ÷ C/Y) − 1), which is 100 × P/Y × i when compounding matches the payments.",
  "assumptions": [
    "The interest rate is the same in every period, and every payment is the same size.",
    "The yearly rate is nominal, compounded as many times a year as set; payments are made as many times a year as set.",
    "The loan is money received; the payments and any balance left at the end are money paid.",
    "No fees or taxes are included. This is an estimate for planning, not financial advice."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "solve": {
        "title": "Find the",
        "description": "Which value to work out; type the others.",
        "type": "string",
        "enum": [
          "n",
          "rate",
          "pv",
          "pmt",
          "fv"
        ]
      },
      "n": {
        "title": "Number of payments",
        "description": "How many payments there are, for example 60 for five years of monthly payments.",
        "type": "number",
        "exclusiveMinimum": 0,
        "maximum": 12000
      },
      "rate": {
        "title": "Interest rate (yearly)",
        "description": "The nominal yearly interest rate in percent, compounded C/Y times a year.",
        "type": "number",
        "x-unit": "percent",
        "exclusiveMinimum": -100,
        "maximum": 1000
      },
      "pv": {
        "title": "Loan amount",
        "description": "The amount borrowed.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "pmt": {
        "title": "Payment",
        "description": "The payment made each period.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "fv": {
        "title": "Balance left at the end",
        "description": "A balloon payment still owed after the last regular payment. 0 for a loan paid off.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "py": {
        "title": "Payments a year",
        "description": "How many payments are made in a year: 12 for monthly.",
        "type": "integer",
        "minimum": 1,
        "maximum": 365
      },
      "cy": {
        "title": "Compounding a year",
        "description": "How many times a year interest compounds. Usually the same as the payments a year.",
        "type": "integer",
        "minimum": 1,
        "maximum": 365
      },
      "due": {
        "title": "Payments at the",
        "description": "The end of each period (usual for loans) or the start of each period (usual for leases).",
        "type": "string",
        "enum": [
          "end",
          "begin"
        ]
      }
    }
  },
  "outputs": {
    "n": {
      "label": "Number of payments",
      "description": "How many payments there are, for example 60 for five years of monthly payments.",
      "format": "number"
    },
    "rate": {
      "label": "Interest rate (yearly)",
      "description": "The nominal yearly interest rate in percent, compounded C/Y times a year.",
      "format": "percent"
    },
    "pv": {
      "label": "Loan amount",
      "description": "The amount borrowed.",
      "format": "money"
    },
    "pmt": {
      "label": "Payment",
      "description": "The payment made each period.",
      "format": "money"
    },
    "fv": {
      "label": "Balance left at the end",
      "description": "A balloon payment still owed after the last regular payment. 0 for a loan paid off.",
      "format": "money"
    },
    "periodRate": {
      "label": "Rate per period",
      "description": "The interest rate for one payment period, i = (1 + I/Y ÷ C/Y)^(C/Y ÷ P/Y) − 1.",
      "format": "percent"
    },
    "ear": {
      "label": "Effective yearly rate",
      "description": "The rate over a whole year once interest compounds: (1 + i)^(P/Y) − 1.",
      "format": "percent"
    },
    "totalPmt": {
      "label": "Total of payments",
      "description": "The number of payments × the payment.",
      "format": "money"
    },
    "interest": {
      "label": "Total interest",
      "description": "All the payments plus the balance left at the end, minus the loan amount.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "solve": "rate",
      "py": 12,
      "cy": 12,
      "due": "end",
      "rate": 7.42,
      "n": 60,
      "pv": 20000,
      "pmt": 400,
      "fv": 0
    },
    "outputs": {
      "rate": 7.420095793504756,
      "periodRate": 0.6183413161253963,
      "ear": 7.677718473840336,
      "totalPmt": 24000,
      "interest": 4000
    },
    "text": "A $20,000.00 loan repaid with 60 payments of $400.00 has an interest rate of 7.4201% a year."
  },
  "examples": [
    {
      "given": {
        "solve": "rate",
        "n": 60,
        "pv": 20000,
        "pmt": 400,
        "fv": 0,
        "py": 12,
        "cy": 12,
        "due": "end"
      },
      "expect": {
        "rate": 7.420095793504844,
        "totalPmt": 24000,
        "interest": 4000
      },
      "source": "the loan payment equation of the Texas Instruments BA II PLUS Guidebook (https://education.ti.com/html/eguides/financials/pdfs/EN/BA-II-PLUS_EN.pdf) solved for the rate; Python 3 cross-check",
      "tolerance": 1e-8
    },
    {
      "given": {
        "solve": "rate",
        "n": 48,
        "pv": 8000,
        "pmt": 200,
        "fv": 0,
        "py": 12,
        "cy": 12,
        "due": "end"
      },
      "expect": {
        "rate": 9.24176698584236
      },
      "source": "Microsoft Excel RATE function example: 9.24% a year (https://support.microsoft.com/en-us/office/rate-function-9f665657-4a7e-4bb7-a030-83fc59e748ce); Python 3 cross-check",
      "tolerance": 1e-8
    },
    {
      "given": {
        "solve": "pmt",
        "n": 36,
        "rate": 4.75,
        "pv": 20000,
        "fv": 0,
        "py": 12,
        "cy": 12,
        "due": "end"
      },
      "expect": {
        "pmt": 597.1756342744287,
        "interest": 1498.3228338794324
      },
      "source": "CFPB, How do I compare auto loan offers? ($20,000 at 4.75% for 36 months: $597 a month, $1,498 interest, https://www.consumerfinance.gov/ask-cfpb/how-do-i-compare-auto-loan-offers-what-should-i-look-at-besides-the-monthly-payment-en-753/); Python 3 cross-check"
    },
    {
      "given": {
        "solve": "rate",
        "n": 60,
        "pv": 30000,
        "pmt": 450,
        "fv": 10000,
        "py": 12,
        "cy": 12,
        "due": "end"
      },
      "expect": {
        "rate": 6.7545550431819645
      },
      "source": "the loan payment equation with a balance left at the end, Broverman (2017), Mathematics of Investment and Credit, chapter 3; hand calculation in content.mdx; Python 3 cross-check",
      "tolerance": 1e-8
    }
  ],
  "sources": [
    "Texas Instruments, BA II PLUS Guidebook: the Time-Value-of-Money worksheet and its formulas. https://education.ti.com/html/eguides/financials/pdfs/EN/BA-II-PLUS_EN.pdf",
    "Microsoft, Excel RATE function, with a worked example. https://support.microsoft.com/en-us/office/rate-function-9f665657-4a7e-4bb7-a030-83fc59e748ce",
    "Consumer Financial Protection Bureau, How do I compare auto loan offers? https://www.consumerfinance.gov/ask-cfpb/how-do-i-compare-auto-loan-offers-what-should-i-look-at-besides-the-monthly-payment-en-753/",
    "S. A. Broverman (2017), Mathematics of Investment and Credit, 7th edition, chapters 2 and 3: annuities and loan repayment."
  ],
  "related": [
    "apr",
    "loan",
    "amortization",
    "financial",
    "simple-interest"
  ],
  "changelog": []
}
