{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://askcalculators.com/calculator/loan-calculator/schema.json",
  "title": "Loan Calculator inputs",
  "description": "Calculate payment, interest, total cost, and the effect of an optional extra payment.",
  "type": "object",
  "properties": {
    "amount": {
      "title": "Loan amount",
      "type": "number",
      "default": 25000,
      "minimum": 1,
      "x-step": 100,
      "multipleOf": 100,
      "x-unit": "currency"
    },
    "annualRate": {
      "title": "Interest rate",
      "type": "number",
      "default": 7.5,
      "minimum": 0,
      "maximum": 40,
      "x-step": 0.1,
      "x-unit": "percent",
      "x-control": "slider-number"
    },
    "years": {
      "title": "Loan term",
      "type": "number",
      "default": 5,
      "enum": [
        1,
        2,
        3,
        5,
        7,
        10
      ],
      "x-optionLabels": {
        "1": "1 year",
        "2": "2 years",
        "3": "3 years",
        "5": "5 years",
        "7": "7 years",
        "10": "10 years"
      }
    },
    "extraPayment": {
      "title": "Extra monthly payment",
      "type": "number",
      "description": "Optional",
      "minimum": 0,
      "x-step": 10,
      "multipleOf": 10,
      "x-unit": "currency"
    }
  },
  "required": [
    "amount",
    "annualRate",
    "years"
  ],
  "additionalProperties": false,
  "x-askcalculators": {
    "version": "1.0.0",
    "calculatorUrl": "https://askcalculators.com/calculator/loan-calculator/",
    "queryExample": "https://askcalculators.com/calculator/loan-calculator/?amount=25000&annualRate=7.5&years=5",
    "migrationStatus": "new",
    "reviewStatus": "pending",
    "pageStatus": "live",
    "workStatus": "pending",
    "formula": {
      "expression": "M = P × [r(1 + r)ⁿ] ÷ [(1 + r)ⁿ − 1]",
      "variables": [
        {
          "symbol": "P",
          "meaning": "loan principal"
        },
        {
          "symbol": "r",
          "meaning": "monthly rate"
        },
        {
          "symbol": "n",
          "meaning": "monthly payment count"
        }
      ]
    },
    "quality": {
      "availability": "live",
      "technicalReviewRecord": "/reviews/loan-calculator.json",
      "qualifiedReview": "pending",
      "qualifiedReviewer": null,
      "qualifiedReviewDate": null,
      "formulaVersion": "1.0.0",
      "referenceCoverage": "references-listed",
      "releaseTestScope": "Flagship reference cases are specified in scripts/test-v20-1.mjs; consult release evidence for executed results.",
      "historicalMetadataDate": "2026-08-18",
      "historicalMetadataNotice": "The imported date is not evidence of a completed human review."
    },
    "outputs": {
      "monthlyPayment": {
        "title": "Scheduled monthly payment",
        "type": "number",
        "x-format": "currency",
        "x-primary": true
      },
      "paymentWithExtra": {
        "title": "Payment with extra",
        "type": "number",
        "x-format": "currency"
      },
      "totalInterest": {
        "title": "Total interest",
        "type": "number",
        "x-format": "currency"
      },
      "totalPayment": {
        "title": "Total paid",
        "type": "number",
        "x-format": "currency"
      },
      "payoffTime": {
        "title": "Payoff time",
        "type": "string",
        "x-format": "text"
      },
      "interestSaved": {
        "title": "Interest saved",
        "type": "number",
        "x-format": "currency"
      }
    }
  }
}
