Skip to content
LunaCalc

Finance

Margin Calculator

Calculate cost, price, profit and margin.

Calculator

About this calculator

This margin calculator converts between cost, price, margin percentage, and markup percentage — two ratios people constantly confuse.

Formula notes

margin = (price − cost) / price; markup = (price − cost) / cost; price = cost / (1 − margin).

Worked examples

  1. Example: cost 60 and price 100 gives a 40% margin but a 66.7% markup — not the same number.
  2. An item costing $72 and selling for $120 earns $48 gross profit, a 40% margin on sales and a 66.67% markup on cost.

How to use it

  1. Enter cost and either price or margin.
  2. Read margin and markup side by side.
  3. Use price = cost / (1 − margin) to hit a target margin.

Frequently asked questions

Why can't margin exceed 100%?

Because cost is divided by price; markup, divided by cost, can exceed 100%.

How do I price for a 30% margin?

price = cost / 0.7, so a 70 cost item sells at 100.

Limits and interpretation

  • Gross margin excludes operating expenses, tax, financing, returns, discounts, platform fees, and inventory losses unless included in cost.
  • Margin and markup use different denominators and must not be compared as if they were the same percentage.

References