{
  "id": "profit",
  "version": "f3fde197c971",
  "status": "published",
  "name": "Profit Calculator",
  "question": "How much profit will I make?",
  "summary": "Computes the profit, revenue, total cost, profit per unit, margin, markup and break-even units from a unit cost, a selling price, the quantity sold, a discount and other costs.",
  "category": "finance",
  "subcategory": "business",
  "url": "https://www.acalculator.org/finance/profit-calculator",
  "markdown": "https://www.acalculator.org/finance/profit-calculator.md",
  "kind": "function",
  "method": "revenue = price × (1 − discount ÷ 100) × units; total cost = cost per unit × units + other costs; profit = revenue − total cost; margin = profit ÷ revenue × 100; markup = profit ÷ total cost × 100; break-even units = ⌈other costs ÷ (price after discount − cost per unit)⌉.",
  "assumptions": [
    "Every unit sells at the same price and costs the same. The discount applies to every unit.",
    "Profit is before income tax. Other costs are for the whole batch and do not change with the units.",
    "Arithmetic is exact on the typed decimals; money shows to the cent, and the margin and markup to 2 decimals, halves up."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "cost": {
        "title": "Cost per unit",
        "description": "What one unit costs you to buy or make.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      },
      "price": {
        "title": "Selling price per unit",
        "description": "The price you sell one unit for, before any discount.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0.0001,
        "maximum": 1000000000000
      },
      "quantity": {
        "title": "Units sold",
        "description": "How many units you sell.",
        "type": "number",
        "minimum": 0.0001,
        "maximum": 1000000000
      },
      "discount": {
        "title": "Discount",
        "description": "A discount off the selling price, as a percent. Leave at 0 for none.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 100
      },
      "other": {
        "title": "Other costs",
        "description": "Costs for the whole batch that do not depend on the units: shipping, fees, rent, ads.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000
      }
    }
  },
  "outputs": {
    "profit": {
      "label": "Profit",
      "description": "Revenue minus total cost. Negative for a loss.",
      "format": "money"
    },
    "revenue": {
      "label": "Revenue",
      "description": "Selling price × (1 − discount ÷ 100) × units sold.",
      "format": "money"
    },
    "totalCost": {
      "label": "Total cost",
      "description": "Cost per unit × units sold + other costs.",
      "format": "money"
    },
    "perUnit": {
      "label": "Profit per unit",
      "description": "Profit ÷ units sold.",
      "format": "money"
    },
    "margin": {
      "label": "Profit margin",
      "description": "Profit ÷ revenue × 100, to 2 decimals (halves up). Left out when the revenue is 0 or the margin is beyond ±1 trillion percent.",
      "format": "percent"
    },
    "markup": {
      "label": "Markup",
      "description": "Profit ÷ total cost × 100, to 2 decimals (halves up). Left out when the total cost is 0 or the markup is beyond ±1 trillion percent.",
      "format": "percent"
    },
    "breakEven": {
      "label": "Units to break even",
      "description": "The fewest whole units that cover every cost: other costs ÷ (price after discount − cost per unit), rounded up. Left out when there are no other costs, or when a unit sells for no more than it costs.",
      "format": "integer"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "cost": 12,
      "price": 20,
      "quantity": 500,
      "discount": 0,
      "other": 0
    },
    "outputs": {
      "profit": 4000,
      "revenue": 10000,
      "totalCost": 6000,
      "perUnit": 8,
      "margin": 40,
      "markup": 66.67
    },
    "text": "Selling 500 units at $20.00 with a cost of $12.00 each makes a profit of $4,000.00."
  },
  "examples": [
    {
      "given": {
        "cost": 15,
        "price": 25,
        "quantity": 100
      },
      "expect": {
        "revenue": 2500,
        "totalCost": 1500,
        "profit": 1000,
        "perUnit": 10,
        "margin": 40,
        "markup": 66.67
      },
      "source": "hand calculation in content.mdx: 25 × 100 − 15 × 100 = 1,000; 1,000 ÷ 2,500 = 40%; 1,000 ÷ 1,500 = 66.67%"
    },
    {
      "given": {
        "cost": 12,
        "price": 20,
        "quantity": 500,
        "discount": 10,
        "other": 1500
      },
      "expect": {
        "revenue": 9000,
        "totalCost": 7500,
        "profit": 1500,
        "perUnit": 3,
        "margin": 16.67,
        "markup": 20,
        "breakEven": 250
      },
      "source": "U.S. Small Business Administration, \"Calculate your startup costs\": break-even units = fixed costs ÷ (price − variable costs) (https://www.sba.gov/business-guide/plan-your-business/calculate-your-startup-costs); hand calculation in content.mdx: 20 × 0.9 × 500 = 9,000; 12 × 500 + 1,500 = 7,500; 1,500 ÷ (18 − 12) = 250"
    },
    {
      "given": {
        "cost": 9.99,
        "price": 12.5,
        "quantity": 3,
        "other": 10
      },
      "expect": {
        "revenue": 37.5,
        "totalCost": 39.97,
        "profit": -2.47,
        "perUnit": -0.8233333333333334,
        "breakEven": 4
      },
      "source": "U.S. Small Business Administration, \"Calculate your startup costs\": break-even units = fixed costs ÷ (price − variable costs) (https://www.sba.gov/business-guide/plan-your-business/calculate-your-startup-costs); hand calculation in content.mdx: 12.50 × 3 = 37.50; 9.99 × 3 + 10 = 39.97; a loss of 2.47; 10 ÷ 2.51 = 3.98…, so 4 units"
    }
  ],
  "sources": [
    "U.S. Small Business Administration, \"Calculate your startup costs\": break-even point = fixed costs ÷ (price − variable costs). https://www.sba.gov/business-guide/plan-your-business/calculate-your-startup-costs",
    "OpenStax, Principles of Accounting, Volume 2: Managerial Accounting, section 3.3 \"Perform Break-Even Sensitivity Analysis\". https://openstax.org/books/principles-managerial-accounting/pages/3-3-perform-break-even-sensitivity-analysis-for-a-single-product-under-changing-business-situations"
  ],
  "related": [
    "margin",
    "gross-margin",
    "markup"
  ],
  "changelog": []
}
