{
  "id": "deadweight-loss",
  "version": "22fd0b67967b",
  "status": "published",
  "name": "Deadweight Loss Calculator",
  "question": "What is the deadweight loss?",
  "summary": "Computes the deadweight loss of a tax or price control from linear demand and supply curves, or from the quantity lost and the price wedge, with the tax revenue.",
  "category": "finance",
  "subcategory": "business",
  "url": "https://www.acalculator.org/finance/deadweight-loss-calculator",
  "markdown": "https://www.acalculator.org/finance/deadweight-loss-calculator.md",
  "kind": "function",
  "method": "Lines: Q₀ = (a − c) ÷ (b + d), Q₁ = max(0, (a − c − t) ÷ (b + d)), buyer price = a − bQ₁, seller price = c + dQ₁, DWL = ½ (Q₀ − Q₁)(buyer price − seller price), revenue = t × Q₁. Quantities: DWL = ½ (Q₀ − Q₁) × gap, revenue = gap × Q₁.",
  "assumptions": [
    "Demand and supply are straight lines, so the lost surplus is a triangle.",
    "The tax is a fixed amount per unit; who legally pays it does not change the result."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "mode": {
        "title": "I have",
        "description": "Straight-line demand and supply equations with a tax, or the two quantities and the price gap.",
        "type": "string",
        "enum": [
          "curves",
          "quantities"
        ]
      },
      "a": {
        "title": "Demand intercept a",
        "description": "Demand is P = a − b × Q: a is the price at which buyers want nothing.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "b": {
        "title": "Demand slope b",
        "description": "How much the demand price falls for each extra unit (b > 0).",
        "type": "number",
        "minimum": 0.000001,
        "maximum": 1000000000000
      },
      "c": {
        "title": "Supply intercept c",
        "description": "Supply is P = c + d × Q: c is the lowest price at which sellers offer anything.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "d": {
        "title": "Supply slope d",
        "description": "How much the supply price rises for each extra unit (d > 0).",
        "type": "number",
        "minimum": 0.000001,
        "maximum": 1000000000000
      },
      "t": {
        "title": "Tax per unit",
        "description": "The per-unit tax that separates the price buyers pay from the price sellers keep.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "q0": {
        "title": "Efficient quantity",
        "description": "The quantity traded without the tax or price control.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "q1": {
        "title": "Quantity with the distortion",
        "description": "The quantity traded with the tax or price control.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "w": {
        "title": "Price gap per unit",
        "description": "At the lower quantity: the price buyers would pay minus the price sellers would accept (the tax, for a tax).",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      }
    }
  },
  "outputs": {
    "dwl": {
      "label": "Deadweight loss",
      "description": "½ × (efficient quantity − quantity with the distortion) × price gap.",
      "format": "number"
    },
    "revenue": {
      "label": "Tax revenue",
      "description": "Price gap × quantity with the distortion (the government’s revenue when the gap is a tax).",
      "format": "number"
    },
    "lost": {
      "label": "Quantity lost",
      "description": "Efficient quantity − quantity with the distortion.",
      "format": "number"
    },
    "q0Out": {
      "label": "Efficient quantity",
      "description": "Where demand meets supply: (a − c) ÷ (b + d).",
      "format": "number"
    },
    "q1Out": {
      "label": "Quantity with the tax",
      "description": "(a − c − t) ÷ (b + d), and 0 if that is below 0.",
      "format": "number"
    },
    "buyerPrice": {
      "label": "Price buyers pay",
      "description": "a − b × the quantity with the tax.",
      "format": "number"
    },
    "sellerPrice": {
      "label": "Price sellers keep",
      "description": "c + d × the quantity with the tax.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "mode": "curves",
      "a": 100,
      "b": 2,
      "c": 10,
      "d": 1,
      "t": 15,
      "q0": 1000,
      "q1": 800,
      "w": 2
    },
    "outputs": {
      "dwl": 37.5,
      "revenue": 375,
      "lost": 5,
      "q0Out": 30,
      "q1Out": 25,
      "buyerPrice": 50,
      "sellerPrice": 35
    },
    "text": "The deadweight loss is 37.5."
  },
  "examples": [
    {
      "given": {
        "mode": "curves",
        "a": 100,
        "b": 2,
        "c": 10,
        "d": 1,
        "t": 15
      },
      "expect": {
        "q0Out": 30,
        "q1Out": 25,
        "buyerPrice": 50,
        "sellerPrice": 35,
        "dwl": 37.5,
        "revenue": 375,
        "lost": 5
      },
      "source": "OpenStax, Principles of Economics 3e, §3.5 (deadweight loss is the loss in social surplus at an inefficient quantity); hand calculation in content.mdx: ½ × (30 − 25) × 15 = 37.5; https://openstax.org/books/principles-economics-3e/pages/3-5-demand-supply-and-efficiency"
    },
    {
      "given": {
        "mode": "quantities",
        "q0": 1000,
        "q1": 800,
        "w": 2
      },
      "expect": {
        "dwl": 200,
        "revenue": 1600,
        "lost": 200
      },
      "source": "OpenStax, Principles of Economics 3e, §3.5; hand calculation in content.mdx: ½ × 200 × 2 = 200; https://openstax.org/books/principles-economics-3e/pages/3-5-demand-supply-and-efficiency"
    },
    {
      "given": {
        "mode": "curves",
        "a": 100,
        "b": 2,
        "c": 10,
        "d": 1,
        "t": 120
      },
      "expect": {
        "q1Out": 0,
        "dwl": 1350,
        "revenue": 0
      },
      "source": "OpenStax, Principles of Economics 3e, §3.5; hand calculation in content.mdx: no trade, so the whole social surplus ½ × 30 × 90 = 1,350 is lost; https://openstax.org/books/principles-economics-3e/pages/3-5-demand-supply-and-efficiency"
    }
  ],
  "sources": [
    "OpenStax. Principles of Economics 3e, §3.5 Demand, Supply, and Efficiency (deadweight loss: the loss in social surplus at an inefficient quantity; price ceiling and price floor examples), retrieved 2026-10-18. https://openstax.org/books/principles-economics-3e/pages/3-5-demand-supply-and-efficiency"
  ],
  "related": [
    "consumer-surplus",
    "price-elasticity-of-demand",
    "comparative-advantage",
    "sales-tax"
  ],
  "changelog": []
}
