{
  "id": "discount",
  "version": "71f411d2595b",
  "status": "published",
  "name": "Discount Calculator",
  "question": "How much is it with the discount?",
  "summary": "Computes the sale price from the original price and the discount, the discount from the two prices, or the original price from the sale price and the discount.",
  "category": "finance",
  "subcategory": "business",
  "url": "https://www.acalculator.org/finance/discount-calculator",
  "markdown": "https://www.acalculator.org/finance/discount-calculator.md",
  "kind": "formulas",
  "method": "S = O × (1 − D ÷ 100): the sale price S is the original price O less D percent of it.",
  "assumptions": [
    "The discount is a percent of the original price: 20 means 20% off.",
    "The discount is from 0% to 100%, so the sale price is never above the original price.",
    "Sales tax is not included."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "originalPrice": {
        "title": "Original price",
        "description": "The regular price before the discount.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000000000
      },
      "discountPercentage": {
        "title": "Discount",
        "description": "The discount, in percent of the original price (20 means 20% off).",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "salePrice": {
        "title": "Sale price",
        "description": "The price you pay after the discount.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      }
    }
  },
  "solve": {
    "fillAny": 2,
    "variables": [
      "originalPrice",
      "discountPercentage",
      "salePrice"
    ],
    "inputsOnly": []
  },
  "outputs": {
    "original": {
      "label": "Original price",
      "description": "The regular price before the discount.",
      "format": "money"
    },
    "percent": {
      "label": "Discount",
      "description": "The discount, in percent of the original price (20 means 20% off).",
      "format": "percent"
    },
    "sale": {
      "label": "Sale price",
      "description": "The price you pay after the discount.",
      "format": "money"
    },
    "saved": {
      "label": "You save",
      "description": "The amount taken off the original price: O − S.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "originalPrice": 100,
      "discountPercentage": 20
    },
    "outputs": {
      "sale": 80,
      "saved": 20
    },
    "text": "20% off $100.00 is $80.00, a saving of $20.00."
  },
  "examples": [
    {
      "given": {
        "originalPrice": 100,
        "discountPercentage": 20
      },
      "expect": {
        "salePrice": 80,
        "saved": 20
      },
      "source": "hand calculation in content.mdx: 100 × (1 − 20 ÷ 100) = 80; 100 − 80 = 20; Discount, sale price and discount rate: OpenStax, Prealgebra 2e, section 6.3 \"Solve Sales Tax, Commission, and Discount Applications\". https://openstax.org/books/prealgebra-2e/pages/6-3-solve-sales-tax-commission-and-discount-applications"
    },
    {
      "given": {
        "originalPrice": 80,
        "salePrice": 60
      },
      "expect": {
        "discountPercentage": 25,
        "saved": 20
      },
      "source": "hand calculation in content.mdx: (1 − 60 ÷ 80) × 100 = 25%; Discount, sale price and discount rate: OpenStax, Prealgebra 2e, section 6.3 \"Solve Sales Tax, Commission, and Discount Applications\". https://openstax.org/books/prealgebra-2e/pages/6-3-solve-sales-tax-commission-and-discount-applications"
    },
    {
      "given": {
        "salePrice": 60,
        "discountPercentage": 40
      },
      "expect": {
        "originalPrice": 100,
        "saved": 40
      },
      "source": "hand calculation in content.mdx: 60 ÷ (1 − 40 ÷ 100) = 100 (old page FAQ: $60 at 40% off was $100); Discount, sale price and discount rate: OpenStax, Prealgebra 2e, section 6.3 \"Solve Sales Tax, Commission, and Discount Applications\". https://openstax.org/books/prealgebra-2e/pages/6-3-solve-sales-tax-commission-and-discount-applications"
    },
    {
      "given": {
        "originalPrice": 59.99,
        "discountPercentage": 15
      },
      "expect": {
        "salePrice": 50.9915,
        "saved": 8.9985
      },
      "source": "hand calculation in content.mdx: 59.99 × 0.85 = 50.9915; 59.99 − 50.9915 = 8.9985; Discount, sale price and discount rate: OpenStax, Prealgebra 2e, section 6.3 \"Solve Sales Tax, Commission, and Discount Applications\". https://openstax.org/books/prealgebra-2e/pages/6-3-solve-sales-tax-commission-and-discount-applications"
    }
  ],
  "sources": [
    "Discount, sale price and discount rate: OpenStax, Prealgebra 2e, section 6.3 \"Solve Sales Tax, Commission, and Discount Applications\". https://openstax.org/books/prealgebra-2e/pages/6-3-solve-sales-tax-commission-and-discount-applications"
  ],
  "related": [
    "percentage",
    "markup"
  ],
  "changelog": [
    {
      "date": "2026-09-29",
      "note": "Worked examples name a published reference for their rule."
    },
    {
      "date": "2026-10-01",
      "note": "A sale price above the original price says no discount in the allowed range fits, instead of “No real value of Discount fits”."
    }
  ]
}
