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
- Choose your currency symbol for display.
- For Value 1 and Value 2, enter an amount and pick what it represents: costs, revenue, margin %, or markup %.
- 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
- Enter costs of production (what it costs to make or buy the item).
- Enter the selling price (what the customer pays).
- 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
- Enter Value 1 as either total costs or net profit.
- Enter total revenue for the period.
- 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.
Related calculators
- ROI Calculator — return on invested capital over time
- Sales Tax Calculator — add or remove tax from selling prices