Tools

Markup vs Margin Calculator

What margin does your price or markup actually produce once percentage fees and per-order costs are counted, and what price does the margin you intend require?

“Margin” is three different numbers wearing one word. A 40% markup is a 28.57% gross margin, because one divides by cost and the other divides by price. A gross margin stops counting at the product cost, and a contribution margin keeps going through the percentage fees and per-order costs that only appear once something has actually sold. This calculator reports all three from the same figures, so you can see which one a number was, and shows the price each margin target would require.

What this tool does not decide

  • Whether a price is right. The model knows the costs you entered and the target you entered. It knows nothing about demand, conversion, competitors or what any customer would pay, so a price it calculates is a mathematical boundary and never a recommendation.
  • Whether a margin is good. There is no benchmark here, no score, no colour band and no industry figure. A target is yours or it does not exist.
  • Whether the business is profitable. The optional monthly figure is after the fixed costs you entered and nothing else. It is not accounting profit, cash profit or net profit, and it says nothing about costs you did not enter.
  • What anyone charges. This tool ships no marketplace, payment-provider or platform fee presets and fetches no rates. Every percentage and every per-order amount is yours — which is also why nothing on this page can quietly go out of date.
  • Anything about tax. VAT, sales tax and GST are outside the model entirely, as are discounts, returns, chargebacks, customer-acquisition cost and inventory accounting.
  • How your own costs should be classified. Whether a particular labour or packaging cost belongs in product cost or in a variable selling cost is your decision, and it changes which measure the cost lands in.

Your figures

Your pricing

What you know

Formatting only. Every money field uses this one currency, and no exchange rate is applied.

Choose the figure you already have. The tool calculates the others.

Direct purchase, manufacturing or production cost for one unit. Selling fees and fulfilment belong in their own fields below. Zero is allowed.

What the customer pays for one unit, before the costs modelled below.

Markup is measured against product cost, not against the price.

Gross margin here uses only the sale price and the direct product cost.

Contribution margin is after every variable cost entered below, and before fixed monthly costs.

Variable selling costs

Percentage fees are modelled as a share of sale revenue.

Platform, payment and any other revenue-based fee added together. Leave at zero if there are none.

Itemise the percentage fees

Use these instead of the combined figure when you want the breakdown. Enter only the percentage part of each fee; a flat amount per order belongs in the field below.

The percentage part only.

The percentage part only. Do not include the fixed amount per transaction here.

Any further fee that scales with revenue.

A flat amount charged once per order or transaction. It is divided across the average units per order below.

Only the part that varies with each order and that you pay. It is divided across the average units per order below.

A value of 1 means every order contains one unit. The two per-order costs above are divided by this number, so a larger average spreads them further.

A variable cost not already counted above — a unit royalty, a pick fee, a consumable.

Your target

Gross margin excludes the other variable costs entered. Contribution margin includes them.

This is your target. UBWHY publishes no benchmark margin and does not suggest one.

Monthly

Only the fixed costs you choose to assign to this product or offer. They stay outside contribution margin.

Your own figure. The tool does not predict demand or volume.

Result

Enter your figures above and select Calculate. Nothing is sent anywhere: the calculation runs in this browser, and no value is stored, shared or placed in the address bar.

Per-unit price bridge. The figures appear once a calculation has run.
ItemAmount per unit
Sale priceNot yet calculated
Less unit product costNot yet calculated
Less percentage selling feesNot yet calculated
Less allocated order and fulfilment costNot yet calculated
Less other variable costsNot yet calculated
Contribution per unitNot yet calculated

This is a unit-economics scenario built from the costs and volume you entered. It does not predict demand, include tax, or establish that the calculated price is commercially viable.

This is the price the arithmetic requires for the target entered. It is not a recommended price, and nothing here models whether customers would pay it.

Definitions, formulas and assumptions

The three measures use different denominators and stop at different costs

Markup and gross margin describe the same money over two different denominators. Gross margin and contribution margin use the same denominator and stop at two different cost layers. Every disagreement between two “margin” figures comes from one of those two facts.

What each measure divides, by what, and which costs it has already stopped counting.
MeasureNumeratorDenominatorCosts countedCosts not counted
MarkupSale price − unit product costUnit product costDirect product cost onlyPercentage fees, per-order costs, other variable costs, fixed monthly costs
Gross marginSale price − unit product costSale priceDirect product cost onlyPercentage fees, per-order costs, other variable costs, fixed monthly costs
Contribution marginSale price − every variable cost enteredSale priceDirect product cost, percentage selling fees, allocated per-order costs, other variable unit costsFixed monthly costs, and anything not entered

Because the additional variable costs are never negative, the contribution margin on this page is always less than or equal to the gross margin. Where they are equal, it means no variable cost beyond direct product cost was entered — not that none exists.

The formulas

Let C be unit product cost, P the sale price, r the combined percentage fee as a decimal, F the fixed order fee, S the seller-paid fulfilment per order, U the average units per order and Vthe other variable cost per unit.

allocated order cost   A = (F + S) / U
variable cost base     B = C + V + A
markup                 m = (P − C) / C          undefined where C = 0
gross margin           g = (P − C) / P
total variable cost   VC = B + P × r
contribution per unit CP = P − VC = P × (1 − r) − B
contribution margin    c = CP / P

Solving a price backwards from a target

The two target modes invert two different identities, and the difference is the reason they are separate modes rather than one:

price for a target gross margin        P = C / (1 − g)
price for a target contribution margin P = B / (1 − r − c)

The first uses only the product cost and the target. The second carries the whole variable-cost base in the numerator and subtracts the percentage fee inside the denominator, because a fee charged on revenue scales with the very price being solved for. Using the first formula for a contribution-margin target understates the price, and the worked example below shows by how much.

Where 1 − r − c is zero or negative, the fee and the target together claim every unit of revenue, so no price satisfies the target. The tool says so in words rather than showing an enormous or negative number.

Fixed monthly costs and break-even

monthly contribution        MC = CP × Q
monthly result              MO = MC − H
whole break-even units    Q_BE = ceiling(H / CP)      only where CP > 0
price needed at volume Q  P_BE = [B + (H / Q)] / (1 − r)

Fixed monthly costs never enter the contribution margin. They are a separate bridge, because a fixed cost divided into a unit margin makes the unit margin depend on volume — which is exactly the confusion contribution margin exists to avoid. Break-even units are rounded upward because part of a unit cannot be sold, so the whole-unit figure usually leaves a small surplus rather than landing exactly on zero.

Where contribution per unit is zero or negative and fixed costs are positive, there is no break-even volume at all: each additional unit adds nothing to cover them. The tool reports that as a state rather than as a very large number of units.

What this tool does not decide

  • Whether a price is competitive, acceptable to customers, or one that demand would survive. No demand, elasticity or conversion assumption exists anywhere in the model.
  • Whether the business is profitable. The monthly figure is after the fixed costs you entered and nothing else, and it is not accounting profit, cash profit or net profit.
  • Whether a margin is good. There is no benchmark, no score, no colour band and no industry figure in this tool, and none will be added without sourced, category-specific evidence.
  • Anything about tax. VAT, sales tax and GST are entirely outside the model, as are discounts, returns, chargebacks and customer-acquisition cost.
  • What any marketplace, payment provider or platform charges. The tool ships no fee presets and fetches no rates. Every percentage and every per-order amount is yours, which is why nothing on this page can go out of date.

Which of the three measures a figure refers to, and which costs it has already stopped counting, is explained in full in the companion article:Markup, gross margin and contribution margin explained.

Worked examples

Both examples below are produced by the same model this page runs, at build time. They use plain numbers with no currency symbol, name no marketplace or payment provider, and are not presented as typical of any business.

A 40% markup is not a 40% margin

A unit costs 40.00 and carries a 40.00% markup. Markup is measured on cost, so the price is 56.00 and the gross profit is 16.00. That same gross profit, divided by the price instead of by the cost, is a gross margin of28.57% — not 40.00%. Nothing has gone wrong: the two percentages describe the same money over two different denominators.

No selling fee or order cost was entered here, so the contribution margin is the same 28.57%. That equality is a fact about what was entered, not about the business.

The same 40% target, and two different prices

Now add a 5.00% revenue-based fee and a 0.30 fixed cost per order, with one unit per order. A seller who says “I want 40%” has not yet said which 40% they mean, and the two readings do not meet:

  • As a gross-margin target, the price is 66.67. The gross margin is 40.00% exactly as asked — and after the fee and the order cost, the contribution margin is only 34.55%.
  • As a contribution-margin target, the price is 73.27. The contribution margin is 40.00%, and the gross margin sits higher at 45.41%.

The gap between 66.67 and 73.27 is what a single undefined word costs. The naive shortcut for a target price — cost divided by one minus the target — produces the first figure. It is the right answer to the gross-margin question and the wrong answer to the contribution-margin one, because it leaves the percentage fee out of the denominator and the order cost out of the numerator.

Neither price is a recommendation. The model knows the costs entered and the target entered; it does not know what any customer would pay.

Go deeper

  • Work out which margin you are being told about

    Markup, Gross Margin and Contribution Margin Explained

    Why the same price can be a 40% markup, a 28.57% gross margin and a lower contribution margin again — and why two reputable sources can report different margins for identical figures without either doing the arithmetic wrongly.

    Read the explainer: Markup, Gross Margin and Contribution Margin Explained

Calculation model and corrections

Calculation model
Markup vs Margin v1.0
Last reviewed
Markup
Measured on direct product cost — the difference divided by cost
Gross margin
Measured on sale price, after direct product cost only
Contribution margin
Measured on sale price, after every variable cost entered, before fixed monthly costs
Percentage fees
A share of sale revenue, applied to the entered or solved price
Per-order costs
Divided across the average units per order you enter; never rounded first
Fixed monthly costs
Kept outside unit contribution margin, in a separate monthly bridge
Break-even units
Whole units, rounded upward, because part of a unit cannot be sold
Target price
A mathematical boundary under your costs; it models no demand
Zero product cost
Markup is undefined rather than infinite; both margins remain available
Excluded
Tax, discounts, returns, demand response, and all live or preset provider rates
Rounding
Display only; intermediate values remain unrounded

Correction history

  • Version 1.0 hardening review, 5 August 2026: cross-tool terminology, metadata, rule-ID, inheritance and validation alignment. Rule IDs were normalised from MM-I01 to MM-I-01, and the mode-specific primary outcome was locked in the result schema. Target-price denominators were specified to use the shared scale-aware equality rather than an exact-zero test, because 1 − 0.7 − 0.3 is not exactly zero in binary floating point and the published vector MM-6 would otherwise have rendered an extreme price instead of a non-reachable state. No formula, cost layer or output meaning changed, and no published result was affected — none existed.