Calculators

Margin Calculator

Calculate gross margin, sales margin, and net profit margin from costs, revenue, and selling price. Three modes on one page with markup, profit dollars, and a visual margin gauge.

$
$

Margin calculation

Gross Margin

Gross Margin

Markup Profit divided by costs, as a percentage.

Gross Profit

Gross Margin (%)

Note: Margin figures are illustrative planning tools only and do not constitute financial or tax advice.

Measure how much of each dollar of revenue becomes profit. Switch between gross margin, sales margin, and net profit margin — each mode shows margin %, markup, profit, and a semi-circular gauge from 0 to 100%.

How to use this margin calculator

This single tool covers three common margin questions for products, services, and overall business performance. Use the tabs above the form to switch modes — you stay on one page.

Gross margin mode

  1. Choose your currency symbol for display.
  2. For Value 1 and Value 2, enter an amount and pick what it represents: costs, revenue, margin %, or markup %.
  3. Click Calculate — the tool solves the missing figures and shows gross margin %, markup %, gross profit, and a gauge meter.

Example: costs $100 and revenue $110 → 9.09% gross margin, 10% markup, and $10 gross profit. For every $1 of revenue, about $0.09 is retained as gross profit.

Sales margin mode

  1. Enter costs of production (what it costs to make or buy the item).
  2. Enter the selling price (what the customer pays).
  3. Click Calculate for sales margin %, markup %, cost percentage, and per-unit profit.

Example: costs $100 and selling price $120 → 16.67% sales margin, 20% markup, and 83.33% of the price is cost. Each unit sold retains $20 gross profit.

Net profit margin mode

  1. Enter Value 1 as either total costs or net profit.
  2. Enter total revenue for the period.
  3. Click Calculate for net profit margin %, net profit dollars, markup on costs, and revenue-per-dollar insight.

Example: total costs $100 and revenue $130 → 23.08% net profit margin and $30 net profit. For every $1 of revenue collected, the business makes about $0.23 in net profit.

What is margin?

Margin expresses profit as a percentage of revenue — how much of each sales dollar you keep after costs. It is one of the most useful metrics for pricing, benchmarking, and financial health because it scales across deal sizes.

Gross margin vs net profit margin

Gross margin uses revenue minus direct costs (cost of goods sold). It shows product-level profitability before overhead, taxes, and financing. Net profit margin uses all costs and net profit after operating expenses — a fuller picture of bottom-line performance.

Sales margin (unit pricing)

Sales margin applies the same margin logic to a single item: production cost versus selling price. It is ideal for retail, wholesale, and menu pricing where you know per-unit economics.

Margin vs markup

Gross or net profit margin as a share of revenue

Profit relative to cost base

Margin divides profit by revenue; markup divides profit by costs. A 25% markup is not the same as a 25% margin — markup is always higher when both are positive. This calculator shows both so you can align with supplier quotes (often markup) and financial statements (margin).

Operating margin

Operating margin sits between gross and net: revenue minus operating expenses (before interest and taxes), divided by revenue. This tool focuses on gross, unit sales, and net profit margins; use your P&L operating income line for operating margin benchmarks.

Examples and use cases

Worked example

Gross margin mode with costs $100 and revenue $110:

  • Gross profit = $10
  • Gross margin = 10 ÷ 110 × 100 = 9.09%
  • Markup on cost = 10 ÷ 100 × 100 = 10%

Real-world use cases

  • Menu pricing: A café owner enters food cost and target selling price per dish to confirm each item clears a 65% gross margin before overhead.
  • Wholesale quote review: A retailer checks whether a supplier’s 40% markup translates to an acceptable 28.6% margin at the planned shelf price.
  • Quarterly P&L review: A founder enters total revenue and net profit from financial statements to benchmark net margin against industry peers.

Common questions

Quick answers before you start calculating.

Gross Margin solves margin from flexible cost/revenue/percentage inputs. Sales Margin compares production cost to selling price per item. Net Profit Margin measures bottom-line profit as a share of total revenue.