{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://askcalculators.com/calculator/credit-card-payoff-calculator/schema.json",
  "title": "Credit Card Payoff Calculator inputs",
  "description": "Find payoff time from a payment or the payment needed for a chosen payoff period.",
  "type": "object",
  "properties": {
    "balance": {
      "title": "Card balance",
      "type": "number",
      "default": 5000,
      "minimum": 0.01,
      "x-step": 100,
      "multipleOf": 100,
      "x-unit": "currency"
    },
    "apr": {
      "title": "APR",
      "type": "number",
      "default": 18.9,
      "minimum": 0,
      "maximum": 100,
      "x-step": 0.1,
      "x-unit": "percent",
      "x-control": "slider-number"
    },
    "mode": {
      "title": "Calculate from",
      "type": "string",
      "default": "payment",
      "enum": [
        "payment",
        "months"
      ],
      "x-optionLabels": {
        "payment": "Monthly payment",
        "months": "Payoff months"
      }
    },
    "monthlyPayment": {
      "title": "Monthly payment",
      "type": "number",
      "default": 200,
      "minimum": 0.01,
      "x-step": 10,
      "multipleOf": 10,
      "x-unit": "currency",
      "x-showWhen": {
        "field": "mode",
        "equals": "payment"
      }
    },
    "payoffMonths": {
      "title": "Payoff months",
      "type": "number",
      "default": 24,
      "minimum": 1,
      "maximum": 1200,
      "x-step": 1,
      "multipleOf": 1,
      "x-showWhen": {
        "field": "mode",
        "equals": "months"
      }
    }
  },
  "required": [
    "balance",
    "apr",
    "mode"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "mode": {
            "const": "payment"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "monthlyPayment"
        ]
      }
    },
    {
      "if": {
        "properties": {
          "mode": {
            "const": "months"
          }
        },
        "required": [
          "mode"
        ]
      },
      "then": {
        "required": [
          "payoffMonths"
        ]
      }
    }
  ],
  "additionalProperties": false,
  "x-askcalculators": {
    "version": "1.0.0",
    "calculatorUrl": "https://askcalculators.com/calculator/credit-card-payoff-calculator/",
    "queryExample": "https://askcalculators.com/calculator/credit-card-payoff-calculator/?balance=5000&apr=18.9&mode=payment&monthlyPayment=200",
    "migrationStatus": "new",
    "reviewStatus": "pending",
    "pageStatus": "live",
    "workStatus": "pending",
    "formula": {
      "expression": "Payment = balance × r ÷ [1 − (1 + r)⁻ⁿ]",
      "note": "Payment mode simulates the balance month by month. Interest is compounded monthly."
    },
    "quality": {
      "availability": "live",
      "technicalReviewRecord": "/reviews/credit-card-payoff-calculator.json",
      "qualifiedReview": "pending",
      "qualifiedReviewer": null,
      "qualifiedReviewDate": null,
      "formulaVersion": "1.0.0",
      "referenceCoverage": "references-pending",
      "releaseTestScope": "Catalog and regression checks are not a professional formula audit; consult release evidence.",
      "historicalMetadataDate": "2026-08-18",
      "historicalMetadataNotice": "The imported date is not evidence of a completed human review."
    },
    "outputs": {
      "payoffTime": {
        "title": "Payoff time",
        "type": "string",
        "x-format": "text",
        "x-primary": true
      },
      "monthlyPaymentResult": {
        "title": "Monthly payment",
        "type": "number",
        "x-format": "currency"
      },
      "totalInterest": {
        "title": "Total interest",
        "type": "number",
        "x-format": "currency"
      },
      "totalPaid": {
        "title": "Total paid",
        "type": "number",
        "x-format": "currency"
      }
    }
  }
}
