{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://askcalculators.com/calculator/discount-calculator/schema.json",
  "title": "Discount Calculator inputs",
  "description": "Find the sale price, savings, optional tax, and effective discount.",
  "type": "object",
  "properties": {
    "originalPrice": {
      "title": "Original price",
      "type": "number",
      "default": 120,
      "minimum": 0,
      "x-step": 0.01,
      "x-unit": "currency"
    },
    "discountType": {
      "title": "Discount type",
      "type": "string",
      "default": "percent",
      "enum": [
        "percent",
        "fixed"
      ],
      "x-optionLabels": {
        "percent": "Percent off",
        "fixed": "Fixed amount"
      }
    },
    "discountValue": {
      "title": "Discount value",
      "type": "number",
      "description": "Percent or money, based on type",
      "default": 20,
      "minimum": 0,
      "x-step": 0.01
    },
    "taxRate": {
      "title": "Tax after discount",
      "type": "number",
      "description": "Optional",
      "default": 0,
      "minimum": 0,
      "maximum": 100,
      "x-step": 0.01,
      "x-unit": "percent"
    }
  },
  "required": [
    "originalPrice",
    "discountType",
    "discountValue"
  ],
  "additionalProperties": false,
  "x-askcalculators": {
    "version": "1.0.0",
    "calculatorUrl": "https://askcalculators.com/calculator/discount-calculator/",
    "queryExample": "https://askcalculators.com/calculator/discount-calculator/?originalPrice=120&discountType=percent&discountValue=20&taxRate=0",
    "migrationStatus": "new",
    "reviewStatus": "pending",
    "pageStatus": "live",
    "workStatus": "pending",
    "formula": {
      "expression": "Final price = original price − discount + tax",
      "note": "A fixed discount is capped at the original price. Tax is applied after the discount."
    },
    "quality": {
      "availability": "live",
      "technicalReviewRecord": "/reviews/discount-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": {
      "finalPrice": {
        "title": "Final price",
        "type": "number",
        "x-format": "currency",
        "x-primary": true
      },
      "savings": {
        "title": "You save",
        "type": "number",
        "x-format": "currency"
      },
      "discountedPrice": {
        "title": "Price before tax",
        "type": "number",
        "x-format": "currency"
      },
      "taxAmount": {
        "title": "Tax",
        "type": "number",
        "x-format": "currency"
      },
      "effectiveDiscount": {
        "title": "Effective discount",
        "type": "number",
        "x-format": "percent"
      }
    }
  }
}
