How we calculate profit margin

Profit margin measures how much is left from every dollar sold after subtracting the costs you're accounting for. It's a percentage ratio, always relative to revenue.

Use the Profit Margin Calculator

Formula

profit = revenue − costs

margin (%) = (profit ÷ revenue) × 100

Variables

revenue
Total amount billed in the period, before any deductions (USD).
costs
Sum of the costs you want to subtract: only COGS for gross margin, or all costs and expenses for net margin.

Step-by-step calculation

  1. We subtract costs from revenue to get the period's profit.
  2. We divide profit by revenue to get the ratio.
  3. We multiply by 100 and round to two decimal places.

Worked example

Inputs

  • Revenue: $10,000
  • Costs: $6,750

Calculation

profit = 10,000 − 6,750 = 3,250

margin = 3,250 ÷ 10,000 = 0.325

Profit margin of 32.5% — $32.50 is left over for every $100 sold.

Common mistakes

  • Dividing profit by cost instead of revenue: that's markup, not margin.
  • Mixing gross and net margin when comparing periods.
  • Forgetting to include taxes and platform fees within costs.

Frequently asked questions

Can margin exceed 100%?

No. Since profit is never greater than revenue, the ceiling is 100%. Values above that indicate markup was calculated by mistake.

What is a good margin?

It depends on the industry: retail often runs single-digit net margins, while software can exceed 40%.

All values are in US dollars (US$). Results are estimates and do not replace professional advice.

Other formulas