{
  "id": "apr",
  "version": "687b6bbe993b",
  "status": "published",
  "name": "APR Calculator",
  "question": "What is the APR of my loan?",
  "summary": "Computes the annual percentage rate (APR) of a fixed-rate loan with monthly payments from the loan amount, interest rate, term and upfront fees, by the Regulation Z actuarial method.",
  "category": "finance",
  "subcategory": "loans",
  "url": "https://www.acalculator.org/finance/apr-calculator",
  "markdown": "https://www.acalculator.org/finance/apr-calculator.md",
  "kind": "function",
  "method": "Payment = PMT(borrowed, rate ÷ 12, months). APR = 12 × j, where j is the monthly rate at which the payments’ present value, payment × (1 − (1 + j)^−n) ÷ j, equals the amount financed (loan amount minus upfront fees).",
  "assumptions": [
    "A fixed-rate loan with equal monthly payments, the first one month after the loan starts (no odd first period).",
    "Upfront fees are prepaid finance charges: they lower the amount financed whether you pay them in cash or add them to the loan.",
    "The APR is the Regulation Z actuarial APR: the monthly rate × 12, with no compounding into a yearly rate.",
    "Fees that are not finance charges (for example some title or appraisal fees on a mortgage) should be left out."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "amount": {
        "title": "Loan amount",
        "description": "The amount you borrow, before any fees are taken off or added on.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000000
      },
      "rate": {
        "title": "Interest rate",
        "description": "The yearly interest rate on the loan (the note rate), before fees.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "term": {
        "title": "Loan term (months)",
        "description": "The number of monthly payments.",
        "type": "integer",
        "minimum": 1,
        "maximum": 600
      },
      "fees": {
        "title": "Upfront fees",
        "description": "Finance charges paid when the loan starts: origination fees, points, and other lender charges that count in the APR.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000
      },
      "financed": {
        "title": "Add the fees to the loan",
        "description": "On: the fees are borrowed on top of the loan amount. Off: you pay them at the start (or they are taken off the money you get).",
        "type": "boolean"
      }
    }
  },
  "outputs": {
    "apr": {
      "label": "APR",
      "description": "The annual percentage rate: the yearly cost of the loan including the upfront fees.",
      "format": "percent"
    },
    "payment": {
      "label": "Monthly payment",
      "description": "The level monthly payment at the interest rate.",
      "format": "money"
    },
    "amountFinanced": {
      "label": "Amount financed",
      "description": "The credit you actually get: the amount borrowed minus the upfront fees.",
      "format": "money"
    },
    "financeCharge": {
      "label": "Finance charge",
      "description": "The dollar cost of the credit: all interest plus the upfront fees.",
      "format": "money"
    },
    "interest": {
      "label": "Total interest",
      "description": "All the interest over the term: total of payments minus the amount borrowed.",
      "format": "money"
    },
    "total": {
      "label": "Total of payments",
      "description": "The monthly payment times the number of payments.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "amount": 25000,
      "rate": 6,
      "term": 60,
      "fees": 750,
      "financed": false
    },
    "outputs": {
      "apr": 7.273991358800956,
      "payment": 483.3200382356979,
      "amountFinanced": 24250,
      "financeCharge": 4749.202294141873,
      "interest": 3999.2022941418727,
      "total": 28999.202294141873
    },
    "text": "A $25,000.00 loan at 6% for 60 months with $750.00 of fees has an APR of 7.274% and a monthly payment of $483.32."
  },
  "examples": [
    {
      "given": {
        "amount": 20000,
        "rate": 5,
        "term": 60,
        "fees": 500,
        "financed": false
      },
      "expect": {
        "apr": 6.047962703875059,
        "payment": 377.4246728802198,
        "amountFinanced": 19500,
        "financeCharge": 3145.4803728131883,
        "interest": 2645.4803728131883
      },
      "source": "Regulation Z appendix J actuarial method (APR = 12 × the monthly rate at which 60 payments of $377.42 are worth $19,500); hand calculation in content.mdx; Python bisection"
    },
    {
      "given": {
        "amount": 20000,
        "rate": 5,
        "term": 60,
        "fees": 500,
        "financed": true
      },
      "expect": {
        "apr": 6.021960406522478,
        "payment": 386.8602897022254,
        "amountFinanced": 20000
      },
      "source": "Regulation Z appendix J actuarial method with $20,500 borrowed and $20,000 financed; Python bisection"
    },
    {
      "given": {
        "amount": 25000,
        "rate": 6.5,
        "term": 72,
        "fees": 0,
        "financed": false
      },
      "expect": {
        "apr": 6.5,
        "payment": 420.2482405945591
      },
      "source": "Regulation Z: with no finance charge but interest, the APR equals the interest rate; hand calculation in content.mdx",
      "tolerance": 1e-8
    },
    {
      "given": {
        "amount": 12000,
        "rate": 0,
        "term": 36,
        "fees": 300,
        "financed": false
      },
      "expect": {
        "apr": 1.6499772822520429,
        "payment": 333.3333333333333,
        "financeCharge": 300
      },
      "source": "Regulation Z appendix J: a 0% loan with a $300 fee; 36 payments of $333.33 are worth $11,700 at 1.65% APR (Python bisection)"
    }
  ],
  "sources": [
    "Regulation Z (Truth in Lending), 12 CFR 1026.22(a): APR by the actuarial method; accurate within 1/8 of 1 percentage point for a regular transaction. https://www.consumerfinance.gov/rules-policy/regulations/1026/22/",
    "Regulation Z, appendix J to part 1026: the actuarial method; the APR is the unit-period rate times the number of unit periods in a year. https://www.consumerfinance.gov/rules-policy/regulations/1026/j/",
    "Regulation Z, 12 CFR 1026.18(b): the amount financed. https://www.consumerfinance.gov/rules-policy/regulations/1026/18/",
    "Regulation Z, 12 CFR 1026.4: the finance charge; charges of a type payable in a comparable cash transaction are not finance charges, and 1026.4(c)(7) excludes real-estate fees such as title examination and appraisal fees. https://www.consumerfinance.gov/rules-policy/regulations/1026/4/",
    "Consumer Financial Protection Bureau, What is the difference between a loan interest rate and the APR? https://www.consumerfinance.gov/ask-cfpb/what-is-the-difference-between-a-loan-interest-rate-and-the-apr-en-733/"
  ],
  "related": [
    "apy",
    "auto-loan",
    "car-affordability"
  ],
  "changelog": []
}
