What it measures
Markup and margin both start from the same gross profit: selling price minus unit cost. Gross margin divides that profit by the selling price; markup divides it by the cost. Buyers and suppliers often speak in markup because they start from cost, while finance teams and profit reports usually speak in margin because they start from revenue. This calculator shows both for one product so that pricing discussions, quotes and margin targets use the same language.
Explain this formula
First compute gross profit per unit: selling price minus unit cost. Gross margin is that gross profit divided by the selling price, multiplied by 100. Markup on cost is the same gross profit divided by the unit cost, multiplied by 100. The numerator is identical; only the denominator changes.
Because the cost is smaller than the price whenever the sale is profitable, markup is always larger than margin for the same sale. The two can be converted into each other: margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin), with percentages written as decimals. A margin cannot reach 100 % while the cost is positive, whereas a markup has no upper limit.
What each term means
- Selling price
- Price per unit before VAT/sales tax unless explicitly selected.
- Where to find it: The price charged for one unit, excluding VAT or sales tax, after any discount actually granted. Must be greater than zero.
- Unit direct cost
- Comparable per-unit direct cost; the cost basis determines type of margin.
- Where to find it: The direct cost of one unit (purchase or production cost, plus inbound freight, duties or packaging if that is your convention), excluding recoverable VAT. Must be greater than zero for a markup to be shown.
- Gross margin (%)
- Gross profit divided by selling price.
- Markup on cost (%)
- Gross profit divided by cost, not by selling price.
Worked example
Hypothetical example: a product costs 40 per unit and sells for 50, both excluding taxes.
- Gross profit per unit50 − 40 = 10
- Gross margin (%)10 ÷ 50 × 100 = 20%
- Markup on cost (%)10 ÷ 40 × 100 = 25%
Gross margin (%) = 20%
50 − 40 = 10 of gross profit per unit. 10 ÷ 50 × 100 = a 20 % gross margin; 10 ÷ 40 × 100 = a 25 % markup on cost. Same 10, two percentages. If the cost rose to 42 with the same price, gross profit would fall to 8, the margin to 16 % and the markup to about 19.05 %; if the price rose to 55 with a cost of 40, gross profit would be 15, the margin about 27.27 % and the markup 37.5 %.
Hypothetical numbers, used to show the calculation. Not real company data.
When and why to use it
Use this calculator whenever a percentage is quoted without its base: a supplier suggesting a “30 % margin”, a sales rep adding “20 % on top of cost”, or a pricing target set by finance. Checking both figures takes seconds and prevents a target from being missed by design.
It is especially useful when building a price from cost. If the company targets a gross margin, adding that same percentage to the cost will always produce a price that is too low. Here you can see which markup the target margin actually requires.
It also helps when comparing reports: retail and wholesale price lists are often built with a markup or a multiplier, whereas profit reports show gross margin. Converting one into the other avoids mistaken conclusions when the two sets of numbers meet in the same meeting.
Why a 25 % markup is not a 25 % profit margin
Take a cost of 40 and add 25 %: the price becomes 50. The gross profit is 10, which is 25 % of the cost but only 20 % of the price. If the company’s target was a 25 % gross margin, it has missed it by five percentage points without anyone making an arithmetic error: the percentage was simply applied to the wrong base.
To reach a 25 % gross margin on a cost of 40, the price must be 40 ÷ (1 − 0.25) ≈ 53.33. The gross profit is then about 13.33, which is 25 % of the price and about 33.33 % of the cost. In other words, a 25 % margin requires a 33.33 % markup. The gap grows with the percentage: a 50 % markup gives a 33.33 % margin, and a 100 % markup (doubling the cost) gives a 50 % margin.
Neither percentage is net profit. Both describe the gap between price and a direct unit cost. Operating expenses, taxes and financing costs come later. Treat markup as a pricing tool and gross margin as a reading of how much of revenue remains after direct costs.
How to read and improve the result
When the sale is profitable, markup is always the higher of the two numbers. The difference between them widens as the gross profit grows relative to cost. Report which one you are using every time you share a percentage.
If the price falls below the cost, both become negative: margin shows the loss as a share of the price, markup as a share of the cost. With a cost of zero, the markup is undefined and only the margin is shown.
Practical levers
- Write targets explicitly as “gross margin on price” or “markup on cost” in price lists and quote templates.
- Build prices from a target margin with price = cost ÷ (1 − margin), not by adding the margin percentage to cost.
- Recalculate both ratios when supplier costs change, since a constant markup keeps the same margin percentage but a constant price does not.
- Check that discounts are applied after the target price has been set, not deducted from the markup.
Common mistakes
- Adding the target margin percentage to the cost and expecting that margin.
- Comparing a supplier’s markup with an internal margin report as if they were the same measure.
- Using a price including VAT on one side and a cost excluding VAT on the other.
- Presenting gross margin or markup as net profit.
Scenario comparison
The conservative case lowers the price by 5 % and raises the cost by 5 %; the optimistic case does the opposite. With the example (price 50, cost 40), the conservative case gives a price of 47.50 and a cost of 42, and the optimistic case a price of 52.50 and a cost of 38.
Watch how each ratio reacts: because the cost is in the denominator of the markup, a change in cost moves markup more sharply than margin. Use the cases to test whether your pricing target still holds if costs drift.
Methodology and limitations
Both ratios rely on one representative price and one unit cost. Product mixes, volume discounts and variable freight need separate calculations or weighted averages.
The result is only as comparable as the cost basis. A cost that includes shipping and payment fees produces a contribution-style ratio, not a gross margin.
Prices and costs are assumed to exclude VAT or sales tax, and discounts are assumed to be already deducted from the price.
Frequently asked questions
What is the difference between markup and margin?
Both use the same gross profit (price − cost). Margin divides it by the selling price; markup divides it by the cost. With a price of 50 and a cost of 40, margin is 20 % and markup is 25 %.
How do I convert markup to margin?
Margin = markup ÷ (1 + markup), with percentages as decimals. A 25 % markup gives 0.25 ÷ 1.25 = 0.20, so a 20 % margin.
How do I convert margin to markup?
Markup = margin ÷ (1 − margin). A 20 % margin gives 0.20 ÷ 0.80 = 0.25, a 25 % markup; a 25 % margin needs about a 33.33 % markup.
Can margin exceed 100 %?
Not while the cost is positive, because the profit is always smaller than the price. Markup has no upper limit: a cost of 10 and a price of 40 gives a 300 % markup but a 75 % margin.
Why is no markup shown when the cost is zero?
Markup divides by the cost, and division by zero is undefined. The margin is still shown, because it divides by the price.
Is either of them net profit?
No. Both compare price with a direct unit cost. Net profit also deducts operating expenses, interest and taxes.
Sources
Last reviewed:
Related calculators
- Profit Margin CalculatorEnter a selling price and the direct cost of one unit to see the gross profit it leaves and the gross margin as a share of the price, per unit or for a whole period.
- Target Selling Price CalculatorFind the price that delivers the gross margin you need on a product or service, and see why adding the same percentage to cost gives a lower margin than you might expect.
- Sales Discount CalculatorTurn a list price and a discount percentage into the price the customer pays, and, if you know the unit cost, see how much of your gross margin and unit profit the discount consumes.
- Contribution Margin CalculatorSee how much each sale leaves to cover fixed costs once every cost that varies with the sale is paid, per unit, as a ratio and in total.