calculate_operating_margin
Calculate operating margin: operating income divided by net sales — profitability from core operations before financing and tax. Formula: Operating Margin = Operating Income / Net Sales. WHEN TO USE: Use to compare core business profitability across peers and over time, independent of capital structure. WHEN NOT TO USE: Do NOT use when one-off items distort operating income — consider normalised EBIT instead. BEHAVIOUR: pure deterministic calculation — no side effects, no network or storage access; idempotent and non-destructive; identical inputs always produce identical outputs. Division by zero or non-finite inputs returns an explicit error instead of a number. RETURNS: JSON object { operating_margin: decimal (e.g. 0.18 = 18%), operating_margin_pct: number (e.g. 18.0), inputs }. PARAMETERS: operating_income (required): Operating income / EBIT, e.g. 180000. May be negative. net_sales (required): Net sales / revenue, e.g. 1000000. Must be > 0.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"operating_income": "<operating_income>",
"net_sales": "<net_sales>"
},
"name": "calculate_operating_margin"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| net_sales | Yes | Net sales / revenue, e.g. 1000000. Must be > 0. | |
| operating_income | Yes | Operating income / EBIT, e.g. 180000. May be negative. |