Skip to content
Margin Calculator
Menu

How the calculators work

Last reviewed November 15, 2026

Margin and markup

Profit margins

Gross profit = revenue − cost of goods sold. Operating income = gross profit − operating expenses. Net income = operating income − interest − taxes. Each margin is that figure ÷ revenue.

Contribution margin

Per unit = price − variable cost. Ratio = per-unit margin ÷ price. Break-even units = fixed costs ÷ per-unit margin, rounded up. Break-even revenue = fixed costs ÷ ratio.

Margin of error

MOE = z × √(p(1 − p) ÷ n), with z = 1.2816, 1.6449, 1.96, 2.3263 or 2.5758 for 80–99% confidence. With a population size N, it's multiplied by √((N − n) ÷ (N − 1)). Sample size = z²p(1 − p) ÷ E², reduced by n ÷ (1 + (n − 1) ÷ N) for a finite population, rounded up.

Industry data

Aswath Damodaran, NYU Stern, U.S. margins by sector, data as of January 2026. We use gross, pre-tax unadjusted operating and net margin.

How we test it

Automated tests check every formula against hand-worked examples, including losses, 100% margins, break-even with no contribution, and sample sizes for ±3% and ±5%. A failing test stops the site from building.

Sources