Two ratios, one contribution
At selling price p and cost c, unit contribution is p − c. Margin divides that contribution by p; markup divides it by c. Both calculations need the cost definition to be stated: a COGS-only gross margin differs from a contribution margin including fulfilment and other variable costs.
With fractions rather than percentages, margin = markup / (1 + markup), and markup = margin / (1 − margin). Neither equation says what target is commercially appropriate; they convert a specified target.
Worked example: 40% markup is not 40% margin
A €60-cost item sold for €100 contributes €40. Its margin is 40%, while its markup is 66.67%. Applying a 40% markup instead gives a price of €84 and a margin of 28.57%.
| Pricing rule | Selling price | Unit contribution | Margin |
|---|---|---|---|
| Target 40% margin: €60 / 0.60 | €100 | €40 | 40.00% |
| Target 40% markup: €60 × 1.40 | €84 | €24 | 28.57% |
| 20% discount from €100 | €80 | €20 | 25.00% |
Keep the tax and cost bases consistent
For a simple arithmetic example, a €120 price including a 20% tax contains a €100 pre-tax price: divide by 1.20, rather than subtracting 20% of €120. Compare that price with costs prepared on the same relevant basis.
The workbench asks for prices excluding recoverable taxes. Whether a tax is recoverable and how it should be accounted for depends on the actual business and jurisdiction. A calculation prepared net of tax is not automatically a suitable consumer-facing advertised price. The commercial analysis and the displayed checkout total answer different questions.
Map the price-basis worksheet
The margin-basis template uses €100 regular price and €60 variable cost, both on the same analysis basis. Include all per-unit variable costs relevant to the decision rather than calling an incomplete product-cost figure a complete contribution cost.
| Worksheet item | CSV field | Check |
|---|---|---|
| Realized no-promotion unit price | regular_price | Use the relevant pre-tax analysis basis |
| Realized discounted unit price | promo_price | After the discount; same tax basis |
| Product plus relevant variable cost | unit_cost | Avoid duplicate campaign costs |
| Currency | currency | One three-letter code for the project |
Handle zero and negative cases honestly
At zero cost, markup is undefined because its denominator is zero. At a positive selling price and zero cost, margin is 100%; a lower target margin has no positive-price solution under that zero-cost model. A calculator should show that boundary rather than an arbitrary infinite or zero answer.
Selling below variable cost produces a negative contribution margin. Preserve that sign. A negative value can be part of a deliberate clearance scenario, but the intended alternative and any separate benefit still need to be stated.
Frequently asked questions
Should I use list price or realized price? Use the realized price relevant to the comparison. A nominal list price that customers rarely pay can exaggerate the apparent discount and the baseline contribution.
Why does my platform margin differ? Check whether it uses net sales after refunds and discounts, which costs it includes, and whether costs existed for all products in the report.
Put it to work
Source context
- Shopify: cost per item and margin calculation
- UK Competition and Markets Authority: price transparency
Guide text and examples were prepared independently for MarginTrial. Sources provide the stated methodological or product context. They do not validate the hypothetical commercial outcomes.