{"openapi":"3.1.0","info":{"title":"Break-Even Calculator API","version":"1.0.0","description":"Break-even and cost-volume-profit maths as an API, computed locally and deterministically. The breakeven endpoint computes the break-even point of a product — the units you must sell to cover all costs, fixed costs ÷ (price − variable cost) — together with the break-even revenue, the contribution margin per unit and the contribution-margin ratio. The target endpoint computes the units and revenue needed to reach a target profit, (fixed costs + target profit) ÷ contribution margin. The margin-of-safety endpoint takes an actual sales level (in units or revenue) and returns the margin of safety — how far sales can fall before a loss — both in units and as a percentage, plus the profit at that level. Everything is computed locally and deterministically, so it is instant and private. Ideal for business, startup and finance app developers, pricing and product-planning tools, and small-business and accounting dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is cost-volume-profit analysis; for per-unit margin and markup pricing use a margin API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/breakeven-api","description":"oanor gateway"}],"tags":[{"name":"Break-Even"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/breakeven":{"get":{"operationId":"get_v1_breakeven","tags":["Break-Even"],"summary":"Break-even point","description":"","parameters":[{"name":"fixed_costs","in":"query","required":true,"description":"Fixed costs","schema":{"type":"string"},"example":"10000"},{"name":"price","in":"query","required":true,"description":"Selling price per unit","schema":{"type":"string"},"example":"50"},{"name":"variable_cost","in":"query","required":true,"description":"Variable cost per unit","schema":{"type":"string"},"example":"30"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Break-even units = fixed / (price − variable). Each unit past break-even adds one contribution margin of profit.","inputs":{"price":50,"fixed_costs":10000,"variable_cost":30},"break_even_units":500,"break_even_revenue":25000,"contribution_margin":20,"contribution_margin_ratio":0.4},"meta":{"timestamp":"2026-06-04T18:38:18.901Z","request_id":"f6202834-1067-48cb-9ecf-8457fc095999"},"status":"ok","message":"Break-even point","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/margin-of-safety":{"get":{"operationId":"get_v1_margin_of_safety","tags":["Break-Even"],"summary":"Margin of safety","description":"","parameters":[{"name":"fixed_costs","in":"query","required":true,"description":"Fixed costs","schema":{"type":"string"},"example":"10000"},{"name":"price","in":"query","required":true,"description":"Selling price per unit","schema":{"type":"string"},"example":"50"},{"name":"variable_cost","in":"query","required":true,"description":"Variable cost per unit","schema":{"type":"string"},"example":"30"},{"name":"actual_units","in":"query","required":false,"description":"Actual units sold","schema":{"type":"string"},"example":"800"},{"name":"actual_sales","in":"query","required":false,"description":"Or actual revenue","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Margin of safety = actual − break-even (how far sales can fall before a loss). Profit = units × CM − fixed.","inputs":{"price":50,"fixed_costs":10000,"actual_units":800,"variable_cost":30},"profit":6000,"break_even_units":500,"margin_of_safety_units":300,"margin_of_safety_percent":37.5},"meta":{"timestamp":"2026-06-04T18:38:19.014Z","request_id":"91c0286e-577a-48e8-9325-a3e8a5eef266"},"status":"ok","message":"Margin of safety","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/target":{"get":{"operationId":"get_v1_target","tags":["Break-Even"],"summary":"Units for a target profit","description":"","parameters":[{"name":"fixed_costs","in":"query","required":true,"description":"Fixed costs","schema":{"type":"string"},"example":"10000"},{"name":"price","in":"query","required":true,"description":"Selling price per unit","schema":{"type":"string"},"example":"50"},{"name":"variable_cost","in":"query","required":true,"description":"Variable cost per unit","schema":{"type":"string"},"example":"30"},{"name":"target_profit","in":"query","required":false,"description":"Target profit (default 0)","schema":{"type":"string"},"example":"5000"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Required units = (fixed + target_profit) / (price − variable). Revenue = units × price.","inputs":{"price":50,"fixed_costs":10000,"target_profit":5000,"variable_cost":30},"required_units":750,"required_revenue":37500,"contribution_margin":20},"meta":{"timestamp":"2026-06-04T18:38:19.129Z","request_id":"1c4d04ad-a6b1-4f6e-a20d-66f9fa2b53e2"},"status":"ok","message":"Target profit units","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"All money values in the same currency; units are whole products in practice (results may be fractional). Single-product CVP model with linear costs.","service":"breakeven-api","formulae":{"target":"units = (fixed + target_profit) / CM","break_even":"units = fixed / CM","contribution":"CM = price − variable_cost","margin_of_safety":"MOS = actual − break-even"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/target":"Units and revenue needed to reach a target profit.","GET /v1/breakeven":"Break-even units and revenue, with the contribution margin and ratio.","GET /v1/margin-of-safety":"Margin of safety and profit at an actual sales level."},"description":"Break-even and cost-volume-profit calculator: break-even point, units for a target profit, and margin of safety."},"meta":{"timestamp":"2026-06-04T18:38:19.249Z","request_id":"62fd056f-e7b6-4c2f-b595-505d27ea173f"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1400,"monthly_call_quota":30000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3900,"monthly_call_quota":200000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":11900,"monthly_call_quota":1500000,"rps_limit":60,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/breakeven-api"}