{
  "id": "marginal-cost",
  "version": "c773ce2430cf",
  "status": "published",
  "name": "Marginal Cost Calculator",
  "question": "What is the marginal cost?",
  "summary": "Computes marginal cost, the extra cost of each extra unit produced, from the total cost at two quantities or from fixed and variable costs, with average cost.",
  "category": "finance",
  "subcategory": "business",
  "url": "https://www.acalculator.org/finance/marginal-cost-calculator",
  "markdown": "https://www.acalculator.org/finance/marginal-cost-calculator.md",
  "kind": "function",
  "method": "Marginal cost = (TC₂ − TC₁) ÷ (Q₂ − Q₁), where TC is total cost at quantity Q; from parts, TC = fixed cost + variable cost. Average cost = TC₂ ÷ Q₂.",
  "assumptions": [
    "Fixed cost is the same at both quantities, so it cancels out of marginal cost.",
    "Marginal cost over a change of several units is the average cost per extra unit across that change.",
    "Arithmetic is exact on the typed decimals; money shows to the cent, halves up."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "title": "I know the",
        "description": "Whether you know the total cost at each quantity, or a fixed cost and the variable cost at each.",
        "type": "string",
        "enum": [
          "total",
          "parts"
        ]
      },
      "fc": {
        "title": "Fixed cost",
        "description": "Costs that do not change with output, such as rent.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "q1": {
        "title": "Starting quantity",
        "description": "Units produced.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "c1": {
        "title": "Total cost at the start",
        "description": "Everything it costs to make the starting quantity.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "v1": {
        "title": "Variable cost at the start",
        "description": "Costs that rise with output, at the starting quantity.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "q2": {
        "title": "New quantity",
        "description": "Units produced.",
        "type": "number",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "c2": {
        "title": "Total cost at the new quantity",
        "description": "Everything it costs to make the new quantity.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "v2": {
        "title": "Variable cost at the new quantity",
        "description": "Costs that rise with output, at the new quantity.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      }
    }
  },
  "outputs": {
    "mc": {
      "label": "Marginal cost",
      "description": "Change in total cost ÷ change in quantity: cost per extra unit.",
      "format": "money"
    },
    "dCost": {
      "label": "Change in total cost",
      "description": "New total cost − starting total cost.",
      "format": "money"
    },
    "dQuantity": {
      "label": "Change in quantity",
      "description": "New quantity − starting quantity.",
      "format": "number"
    },
    "cost1": {
      "label": "Starting total cost",
      "description": "Total cost at the starting quantity.",
      "format": "money"
    },
    "cost2": {
      "label": "New total cost",
      "description": "Total cost at the new quantity.",
      "format": "money"
    },
    "average": {
      "label": "Average cost at the new quantity",
      "description": "New total cost ÷ new quantity.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "total",
      "fc": 160,
      "q1": 40,
      "c1": 320,
      "v1": 160,
      "q2": 60,
      "c2": 400,
      "v2": 240
    },
    "outputs": {
      "mc": 4,
      "dCost": 80,
      "dQuantity": 20,
      "cost1": 320,
      "cost2": 400,
      "average": 6.666666666666667
    },
    "text": "Going from $320.00 to $400.00 of total cost is a marginal cost of $4.00 per unit."
  },
  "examples": [
    {
      "given": {
        "from": "total",
        "q1": 40,
        "c1": 320,
        "q2": 60,
        "c2": 400
      },
      "expect": {
        "mc": 4,
        "average": 6.666666666666667
      },
      "source": "OpenStax, Principles of Economics 3e, 7.3 Costs in the Short Run, Table 7.10 (MC = ΔTC ÷ ΔQ; The Clip Joint: fixed cost $160, variable cost $160 at 40 haircuts and $240 at 60, total cost 320 to 400, so $4 each). https://openstax.org/books/principles-economics-3e/pages/7-3-costs-in-the-short-run: (400 − 320) ÷ (60 − 40) = 80 ÷ 20 = 4"
    },
    {
      "given": {
        "from": "total",
        "q1": 4,
        "c1": 1250,
        "q2": 5,
        "c2": 1650
      },
      "expect": {
        "mc": 400,
        "average": 330
      },
      "source": "OpenStax, Principles of Economics 3e, 9.2 How a Profit-Maximizing Monopoly Chooses Output and Price, Table 9.3 (HealthPill total and marginal cost). https://openstax.org/books/principles-economics-3e/pages/9-2-how-a-profit-maximizing-monopoly-chooses-output-and-price: 1,650 − 1,250 = 400"
    },
    {
      "given": {
        "from": "parts",
        "fc": 160,
        "q1": 40,
        "v1": 160,
        "q2": 60,
        "v2": 240
      },
      "expect": {
        "mc": 4,
        "cost1": 320,
        "cost2": 400
      },
      "source": "OpenStax, Principles of Economics 3e, 7.3 Costs in the Short Run, Table 7.10 (MC = ΔTC ÷ ΔQ; The Clip Joint: fixed cost $160, variable cost $160 at 40 haircuts and $240 at 60, total cost 320 to 400, so $4 each). https://openstax.org/books/principles-economics-3e/pages/7-3-costs-in-the-short-run: (160 + 240) − (160 + 160) = 80; 80 ÷ 20 = 4"
    },
    {
      "given": {
        "from": "total",
        "q1": 1000,
        "c1": 25000,
        "q2": 1250,
        "c2": 29812.5
      },
      "expect": {
        "mc": 19.25
      },
      "source": "hand calculation in content.mdx: 4,812.50 ÷ 250 = 19.25"
    }
  ],
  "sources": [
    "OpenStax, Principles of Economics 3e, 7.3 Costs in the Short Run: MC = ΔTC ÷ ΔQ, and Table 7.10 (The Clip Joint: fixed cost $160; variable cost $160 at 40 haircuts and $240 at 60; total cost $320 and $400). https://openstax.org/books/principles-economics-3e/pages/7-3-costs-in-the-short-run (retrieved 2026-10-05)",
    "OpenStax, Principles of Economics 3e, 9.2 How a Profit-Maximizing Monopoly Chooses Output and Price, Table 9.3: HealthPill total cost of $1,250 at 4 units and $1,650 at 5. https://openstax.org/books/principles-economics-3e/pages/9-2-how-a-profit-maximizing-monopoly-chooses-output-and-price (retrieved 2026-10-05)"
  ],
  "related": [
    "marginal-revenue",
    "break-even",
    "profit",
    "revenue"
  ],
  "changelog": []
}
