What this calculator does
This margin calculator works out gross margin, the share of the selling price that is profit, from a unit cost and a selling price. Margin is the figure most retailers and product businesses lead with, since it states profitability as a percentage of what the customer actually pays.
Margin is easy to confuse with markup, which measures the same profit as a percentage of cost instead of price, and is always the larger number of the two on anything sold above cost. This calculator leads with margin, since that is what "margin calculator" searches are almost always after, and shows markup alongside it as a secondary figure so the two are never mixed up.
The formula
Margin is (price − cost) ÷ price × 100: profit expressed as a share of the selling price. Markup is the same profit figure expressed as a share of cost instead: (price − cost) ÷ cost × 100. Profit per unit is simply price minus cost, before either is turned into a percentage.
| Term | Meaning |
|---|---|
| Margin | Profit as a percentage of the selling price: (price − cost) ÷ price × 100. |
| Markup | The same profit as a percentage of cost instead of price: (price − cost) ÷ cost × 100. |
| Profit per unit | The dollar profit on a single unit: price − cost. |
The inputs explained
| Field | What to enter |
|---|---|
| Unit cost ($) | What one unit costs you to buy or produce, before any markup. |
| Selling price ($) | What one unit sells for to the customer. |
When to use it
Setting a retail price
Knowing the margin a price point delivers, before committing to it, is the standard check retailers run before listing a product, since margin (not markup) is usually the figure compared against a target profitability threshold.
Reading a margin formula off a spec sheet or contract
Supplier terms and internal reports usually quote margin as a plain percentage; entering the cost and price behind that figure confirms it independently rather than trusting a stated number at face value.
Comparing margin across products
Two products can carry the same profit per unit in dollars but very different margins, if their prices differ; margin is the figure that makes that comparison fair across products at different price points.
Worked examples
Every figure in the tables below is produced by this page’s own calculator at build time, so the numbers and the tool always agree. Select any row to load that scenario.
How does margin change as selling price rises, at a fixed cost?
A fixed $40 unit cost, run against a range of selling prices.
| Selling price | Gross margin | Markup | Profit per unit |
|---|---|---|---|
| $50 | 20.0% | 25.0% | $10.00 |
| $60 | 33.3% | 50.0% | $20.00 |
| $80 | 50.0% | 100.0% | $40.00 |
| $100 | 60.0% | 150.0% | $60.00 |
| $150 | 73.3% | 275.0% | $110.00 |
| $200 | 80.0% | 400.0% | $160.00 |
How does margin change as unit cost falls, at a fixed selling price?
A fixed $100 selling price, run against a range of unit costs.
| Unit cost | Gross margin | Markup | Profit per unit |
|---|---|---|---|
| $10 | 90.0% | 900.0% | $90.00 |
| $20 | 80.0% | 400.0% | $80.00 |
| $40 | 60.0% | 150.0% | $60.00 |
| $60 | 40.0% | 66.7% | $40.00 |
| $80 | 20.0% | 25.0% | $20.00 |
| $90 | 10.0% | 11.1% | $10.00 |
Questions
What is the margin formula?
Margin = (price − cost) ÷ price × 100. It expresses profit as a percentage of what the customer pays, which is why margin can never reach 100% unless cost is zero, no matter how high the price is set.
How do I calculate margin from a markup percentage instead of cost and price?
Convert markup to price first: price = cost × (1 + markup/100), then enter that cost and price here. Margin and markup describe the same profit but scale differently, so one cannot be read directly off the other without going through price or cost.
Is a 50% margin the same as a 50% markup?
No. A 50% margin on a $100 price means $50 cost and $50 profit, which is actually a 100% markup on that cost. Margin and markup only match at very small percentages and diverge more the higher they go.
What is a good margin?
It depends heavily on the industry: grocery and wholesale often run on margins in the single digits to low teens, while services and software can run well above 70%. Compare margin against your own category or past pricing rather than a generic target.
To see margin and markup together with total profit at a given sales volume, use the margin and markup calculator. To find the sales volume needed to cover fixed costs at this margin, see the break-even calculator.