HomeBusiness › Gross Margin Calculator

Gross Margin Calculator

Gross margin answers one question: of each revenue dollar, how much survives the direct cost of making the thing? Enter revenue and cost of goods sold — or flip it and price from a target margin.

Gross margin = (revenue − COGS) ÷ revenue. $100 revenue with $60 COGS is a 40% margin (and a 66.7% markup — the two are cousins, not twins).

  • $100 revenue, $60 COGS40% margin
  • Same numbers as markup66.7% (profit ÷ cost)
  • Software gross margins70–90% typical
  • Grocery retail20–30% typical

Margin is on price; markup is on cost — mixing them up misprices products.

$
$
%
Gross margin
Gross profit
Markup equivalent

Margin vs. markup — the table that settles it

Gross marginEquivalent markupPrice for $60 cost
20%25%$75.00
30%42.9%$85.71
40%66.7%$100.00
50%100%$120.00
60%150%$150.00

Pricing from a target margin uses price = cost ÷ (1 − margin). The classic error is multiplying cost by (1 + margin): a “40% margin” priced that way ($60 × 1.4 = $84) actually yields only 28.6%.

Frequently asked questions

How do I calculate gross margin?

(Revenue − COGS) ÷ Revenue × 100. It's the share of each sales dollar left after direct costs — before overhead, marketing, and tax.

What's the difference between gross margin and profit margin?

Gross margin subtracts only COGS. Net profit margin subtracts everything — overhead, payroll, interest, taxes. A 40% gross margin business might run a 5% net margin.

What's a good gross margin?

It's industry-relative: software runs 70–90%, restaurants ~60–70% on food (before labor), grocery 20–30%, distribution single digits. Compare within your industry, not across.

How do I price a product for a 40% margin?

Divide cost by 0.6: a $60 cost needs a $100 price. Dividing by (1 − margin) is the rule; multiplying by 1.4 undershoots.

Sources & methodology

Sources: NumberBench methodology.

Results update as you type and are general estimates, not financial advice.