{
  "id": "operating-margin",
  "version": "8bdc7510e1c6",
  "status": "published",
  "name": "Operating Margin Calculator",
  "question": "How high is my operating margin?",
  "summary": "Computes operating margin, operating income as a percent of net revenue, from operating income or from revenue, cost of sales and operating expenses.",
  "category": "finance",
  "subcategory": "business",
  "url": "https://www.acalculator.org/finance/operating-margin-calculator",
  "markdown": "https://www.acalculator.org/finance/operating-margin-calculator.md",
  "kind": "function",
  "method": "Operating margin = operating income ÷ net revenue × 100. From revenue and costs: gross profit = net revenue − cost of sales, and operating income = gross profit − operating expenses.",
  "assumptions": [
    "Operating income is before interest and income tax, from the same income statement and period as the revenue.",
    "Net revenue is after returns, allowances and discounts.",
    "Arithmetic is exact on the typed decimals; the margin shows to 2 decimals and money to the cent, halves up."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "from": {
        "title": "Start from",
        "description": "Operating income as reported, or net revenue with the cost of sales and operating expenses.",
        "type": "string",
        "enum": [
          "income",
          "costs"
        ]
      },
      "rev": {
        "title": "Net revenue",
        "description": "Sales for the period after returns, allowances and discounts.",
        "type": "number",
        "x-unit": "USD",
        "exclusiveMinimum": 0,
        "maximum": 1000000000000000
      },
      "oi": {
        "title": "Operating income",
        "description": "Income from operations, before interest and income tax. Negative for an operating loss.",
        "type": "number",
        "x-unit": "USD",
        "minimum": -1000000000000000,
        "maximum": 1000000000000000
      },
      "cogs": {
        "title": "Cost of sales",
        "description": "What the goods or services sold in the period cost to make or buy (cost of goods sold).",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000000
      },
      "opex": {
        "title": "Operating expenses",
        "description": "Selling, general and administrative costs, research, depreciation and other running costs.",
        "type": "number",
        "x-unit": "USD",
        "minimum": 0,
        "maximum": 1000000000000000
      }
    }
  },
  "outputs": {
    "margin": {
      "label": "Operating margin",
      "description": "Operating income ÷ net revenue × 100.",
      "format": "percent"
    },
    "income": {
      "label": "Operating income",
      "description": "Income from operations: as typed, or net revenue − cost of sales − operating expenses.",
      "format": "money"
    },
    "gross": {
      "label": "Gross profit",
      "description": "Net revenue − cost of sales. Shown when you start from revenue and costs.",
      "format": "money"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "from": "income",
      "rev": 120000,
      "oi": 43000,
      "cogs": 60000,
      "opex": 17000
    },
    "outputs": {
      "margin": 35.833333333333336,
      "income": 43000
    },
    "text": "Operating income of $43,000.00 on net revenue of $120,000.00 gives an operating margin of 35.83%."
  },
  "examples": [
    {
      "given": {
        "from": "income",
        "rev": 120000,
        "oi": 43000
      },
      "expect": {
        "margin": 35.833333333333336,
        "income": 43000
      },
      "source": "U.S. Securities and Exchange Commission, Beginners’ Guide to Financial Statements (Operating Margin = Income from Operations ÷ Net Revenues). https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements; OpenStax, Principles of Finance, 5.1 The Income Statement (Clear Lake Sporting Goods: net sales $120,000 and $100,000, cost of goods sold $60,000 and $50,000, operating income $43,000 and $38,000). https://openstax.org/books/principles-finance/pages/5-1-the-income-statement: 43,000 ÷ 120,000 × 100 = 35.83% (exact 215/6, Python Fraction)"
    },
    {
      "given": {
        "from": "costs",
        "rev": 120000,
        "cogs": 60000,
        "opex": 17000
      },
      "expect": {
        "margin": 35.833333333333336,
        "income": 43000,
        "gross": 60000
      },
      "source": "OpenStax, Principles of Finance, 5.1 The Income Statement (Clear Lake Sporting Goods: net sales $120,000 and $100,000, cost of goods sold $60,000 and $50,000, operating income $43,000 and $38,000). https://openstax.org/books/principles-finance/pages/5-1-the-income-statement: 120,000 − 60,000 = 60,000 gross profit; 60,000 − 17,000 = 43,000 operating income"
    },
    {
      "given": {
        "from": "income",
        "rev": 100000,
        "oi": 38000
      },
      "expect": {
        "margin": 38
      },
      "source": "U.S. Securities and Exchange Commission, Beginners’ Guide to Financial Statements (Operating Margin = Income from Operations ÷ Net Revenues). https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements; OpenStax, Principles of Finance, 5.1 The Income Statement (Clear Lake Sporting Goods: net sales $120,000 and $100,000, cost of goods sold $60,000 and $50,000, operating income $43,000 and $38,000). https://openstax.org/books/principles-finance/pages/5-1-the-income-statement: 38,000 ÷ 100,000 × 100 = 38%"
    },
    {
      "given": {
        "from": "costs",
        "rev": 80000,
        "cogs": 50000,
        "opex": 36000
      },
      "expect": {
        "margin": -7.5,
        "income": -6000,
        "gross": 30000
      },
      "source": "hand calculation in content.mdx: 80,000 − 50,000 − 36,000 = −6,000; −6,000 ÷ 80,000 × 100 = −7.5%"
    },
    {
      "given": {
        "from": "income",
        "rev": 9876.54,
        "oi": 1234.56
      },
      "expect": {
        "margin": 12.499924062475321
      },
      "source": "hand calculation in content.mdx: 1,234.56 ÷ 9,876.54 × 100 = 12.4999…% (exact 2057600/164609, Python Fraction), shown as 12.5%"
    }
  ],
  "sources": [
    "U.S. Securities and Exchange Commission, Beginners' Guide to Financial Statements: operating margin = income from operations ÷ net revenues, usually shown as a percent; operating income is gross profit less operating expenses, before interest and income tax. https://www.sec.gov/about/reports-publications/beginners-guide-financial-statements (retrieved 2026-10-19)",
    "OpenStax, Principles of Finance, 5.1 The Income Statement: the Clear Lake Sporting Goods income statement (net sales $120,000 and $100,000, cost of goods sold $60,000 and $50,000, operating income $43,000 and $38,000). https://openstax.org/books/principles-finance/pages/5-1-the-income-statement (retrieved 2026-10-19)"
  ],
  "related": [
    "operating-income",
    "gross-margin",
    "profit",
    "ebitda"
  ],
  "changelog": []
}
