Direct answer
Markup and margin describe the same money over two different denominators: markup divides the difference by cost, margin divides it by price, so markup is always the larger number. Gross margin and contribution margin share the denominator and differ in where they stop counting costs. The word "margin" on its own names none of these three, which is why two pages can report different margins from identical figures without either being wrong.
- The condition that matters most
- There is no single agreed answer to what gross margin contains. The management-accounting convention draws the line at cost behaviour, so gross margin includes fixed production overhead and contribution margin is the larger figure. The ecommerce operating convention draws it at cost function, so gross margin is product cost only and contribution margin is always the smaller figure. Both are internally consistent and they disagree about which number is bigger.
- What this does not tell you
- This article explains what each measure counts and what it has stopped counting. It publishes no benchmark margin, names no marketplace, payment processor or platform, quotes no fee rate, and takes no view on what any business should charge. A higher margin on any of these definitions does not establish that a price is achievable, that demand would survive it, or that the business is profitable.
- Last reviewed
Three measures, one word
A seller says their margin is 40%. That sentence has not yet said anything precise, and depending on what they meant it can describe three materially different situations:
- a 40% markup, which puts the price 40% above cost;
- a 40% gross margin, which puts the cost 60% of the price;
- a 40% contribution margin, which leaves 40% of the price after every variable cost of selling the thing, not merely after buying it.
Those are not shades of the same figure. On a unit costing 40, the first gives a price of 56, the second gives 66.67, and the third gives a different number again as soon as any selling fee exists. Somebody reporting the first while their reader hears the third is out by a third of the price.
This article is about telling them apart — and about a genuine disagreement in the published sources that makes doing so harder than it should be.
Markup and margin: the same money, two denominators
Both measure one quantity: the difference between what a unit sells for and what the unit cost.
difference = sale price − unit product cost
Markup divides that difference by the cost. Margin divides it by the price.
markup = (price − cost) / cost
gross margin = (price − cost) / price
Since the price is larger than the cost on any profitable unit, the second denominator is larger, so the second percentage is smaller. That is all that is happening. Neither is a corrected version of the other.
A unit costing 40 with a 40% markup sells for 56. The difference is 16.
markup = 16 / 40 = 40%
gross margin = 16 / 56 = 28.57%
The 28.57% is not a loss of anything. It is the identical 16 measured against a different base. The two convert directly:
gross margin = markup / (1 + markup)
markup = gross margin / (1 − gross margin)
Which is why a 50% markup is a 33.33% margin, a 100% markup is a 50% margin, and a 100% margin is impossible unless the unit is free.
The practical consequence is a pricing error, not a reporting one. A seller who wants to keep 40% of revenue and applies a 40% markup keeps 28.57%. To keep 40% of revenue they need a 66.67% markup.
Where gross margin stops
Gross margin subtracts the cost of the thing. It does not subtract the cost of selling the thing.
For a unit sold online that omission is not small. A percentage fee on the sale, a flat charge per transaction, the packaging, the shipping the seller pays for, a per-unit fulfilment charge — none of those are the product’s cost, and all of them come out of the same sale. Gross margin was never designed to include them and does not.
Contribution margin keeps subtracting. It answers a different question: after everything that varies with the sale, how much does this unit contribute towards the costs that do not vary — the rent, the software, the salaries?
contribution per unit = price − product cost − variable selling costs
contribution margin = contribution per unit / price
Same denominator as gross margin. Different numerator, because it stops at a different cost layer. And because those additional costs are never negative, the contribution margin is never above the gross margin — on this definition.
That last clause is doing a lot of work, and the next section is why.
The part nobody warns you about: the sources disagree
Here is where a reader trying to get this right runs into trouble. Two established bodies of writing use these terms, and they do not draw the line in the same place.
The management-accounting convention separates costs by behaviour: fixed versus variable. Cost of goods sold contains the fixed production overhead — equipment depreciation, supervisory salaries — so gross margin has already absorbed fixed manufacturing costs. Contribution margin then strips out everything fixed, while adding variable selling costs like commission. Because it removes more fixed cost than it adds variable cost, contribution margin comes out higher than gross margin. AccountingTools states exactly that: contribution margin tends to yield the higher percentage, because it includes fewer costs. AccountingCoach works the same example with the same result. Both are cited in full below.
The ecommerce operating convention separates costs by function: the product versus everything else. Gross margin is price minus what the unit cost to buy or make. Contribution margin then subtracts payment fees, shipping, fulfilment and returns. On that reading contribution margin is always lower than gross margin.
Both are coherent. They produce opposite orderings of the same two words.
And the disagreement is not confined to the boundary between the two worlds. Two current sources writing for the same ecommerce seller place the same cost line on opposite sides:
- Cahoot, writing on ecommerce cost of goods sold, lists per-transaction payment-processing fees and per-unit third-party-logistics pick-pack-ship charges as components of cost of goods sold — inside gross margin.
- BreakevenHQ, writing for sellers on the same platform, lists payment-processing fees and fulfilment cost among the things gross margin leaves out — below gross margin.
A seller who reads both, correctly, learns two incompatible things about where their own payment fees belong. Neither source has made an arithmetic mistake. They have made different classification decisions and, like almost every page on this subject, neither says out loud that the decision was available.
This is the single most useful thing to know about margin figures: the number depends on a classification choice that is usually invisible. When two margin figures disagree, the first thing to check is not the arithmetic. It is where each one stopped counting.
Which convention this site uses, and why it says so
Because there is no universal answer, a tool that reports these figures has to declare its own and hold to it. The UBWHY calculator uses the ecommerce operating convention:
- markup is measured on direct product cost;
- gross margin is measured on sale price after direct product cost only;
- contribution margin is measured on sale price after every variable cost entered, and before any fixed monthly cost.
So on that tool, contribution margin is always less than or equal to gross margin. Fixed monthly costs never enter a unit margin at all; they sit in a separate monthly calculation. If you are comparing its output against a figure from a management-accounting source, expect the ordering to differ, and expect the reason to be classification rather than error.
Declaring the convention is not a formality. It is the only thing that makes a margin figure checkable by somebody who did not produce it.
Percentage fees, flat fees, and why they behave differently
Variable selling costs come in two shapes, and they do not respond to price in the same way.
A percentage fee takes a share of revenue. Raise the price and the fee rises with it, so it never stops being the same proportion. It reduces the margin rate by a fixed number of percentage points and no amount of price increase escapes it.
A flat fee per order is a fixed amount. Raise the price and it stays put, so it shrinks as a proportion. It hurts a cheap unit far more than an expensive one.
This is why a seller of low-priced items can find that a modest-sounding per-transaction charge is the dominant cost, while a seller of expensive items barely notices the same charge and is far more exposed to the percentage.
Per-order costs are not per-unit costs
A flat fee is charged per order, not per unit. If an order contains three units, the fee is divided three ways.
allocated per-unit order cost = (order fee + seller-paid fulfilment) / units per order
Most calculators quietly assume one unit per order. That assumption is invisible and it is frequently wrong, and it moves the answer more than people expect. A flat charge of 5 on a 20 unit is:
- 5 per unit in a single-unit order — a quarter of the price;
- 2.50 per unit at two units per order;
- 1.67 per unit at three.
Contribution margin moves accordingly, from 25% to 37.5% to about 41.7% with nothing else changed. Order size is a genuine driver of unit economics, and a model that hides it inside a per-unit figure has hidden a decision, not a detail.
The reverse is worth stating too: an average order size is an average you supplied. It is not a guarantee, and pricing on the assumption that baskets will grow is a forecast about customers rather than a fact about costs.
Two targets, two prices
This is where the ambiguity stops being a vocabulary problem and starts costing money.
Solving a price backwards from a target gross margin is the formula everybody knows:
price = cost / (1 − target gross margin)
Solving a price backwards from a target contribution margin is not that formula. Every non-percentage variable cost has to join the numerator, and the percentage fee has to be subtracted inside the denominator, because a fee charged on revenue scales with the very price being solved for:
price = (cost + allocated order cost + other variable cost) / (1 − fee rate − target contribution margin)
Take a unit costing 40, a 5% revenue fee, a flat 0.30 per order and one unit per order. A seller who says “I want 40%” gets two different answers:
- as a gross-margin target, the price is 66.67, the gross margin is 40% exactly as asked, and the contribution margin is only about 34.5%;
- as a contribution-margin target, the price is 73.27, the contribution margin is 40%, and the gross margin sits higher at about 45.4%.
Roughly ten per cent of the price, riding on which of two words was meant. Using the familiar formula for the second question is not a rounding difference; it is the wrong formula, and it errs in the direction of under-pricing.
There is also a boundary worth knowing. If the fee rate and the target contribution margin add up to 100% or more, no price satisfies the target — the fee and the target between them have claimed every unit of revenue, leaving nothing for the product cost. That is not a very large price. It is no price at all, and a calculator that returns a huge number there is dividing by something it should have refused to divide by.
A positive contribution is not a covered month
Contribution margin answers a unit question. It says how much each sale leaves towards costs that do not vary with sales. It does not say whether those costs are covered.
monthly contribution = contribution per unit × units sold
monthly result = monthly contribution − fixed monthly costs
A unit contributing 11.25 is contributing something. At 200 units that is 2,250 against fixed costs of 3,000, and the month is 750 short. Nothing about the unit figure was wrong, and nothing about it was sufficient.
Turning it around gives break-even volume:
break-even units = fixed monthly costs / contribution per unit
which for those figures is 266.67 — and therefore 267, because two thirds of a unit cannot be sold. Break-even volumes round upward, always, and the whole figure normally leaves a small surplus rather than landing exactly on zero.
Two edge cases matter more than they look:
- If contribution per unit is zero or negative, there is no break-even volume at any scale. Each extra sale adds nothing to cover fixed costs, or subtracts from the total. Selling more is not a route out; the price or the variable costs have to change first. This is the case where a gross margin can look entirely healthy — the product does make money — while the unit still cannot fund a single fixed cost.
- If contribution per unit is positive but small, break-even volume can be a number the business has no realistic way of reaching. The arithmetic will produce it regardless. It is a threshold, not a plan.
How to tell which margin you are being shown
A practical test, in the order that resolves fastest:
- Is the denominator cost or price? If a percentage is measured against cost, it is a markup, and it will always look larger than the corresponding margin. Anything measured against price is a margin of some kind.
- Did anything come off after the product cost? If not, it is a gross margin, whatever it has been called.
- Which specific costs came off? This is the question almost no source answers explicitly. Payment fees? Marketplace commission? Outbound shipping? Returns? Two figures both called contribution margin can contain different lists.
- Did any fixed cost come off? If so, it is not a contribution margin in the ecommerce sense, and comparing it against one will mislead in both directions.
- Per unit or per order? A flat fee sitting in a per-unit figure implies an order size. Find out what was assumed.
If a source will not answer questions 3 and 4, its margin figure is not comparable with anything, and treating it as a benchmark is guesswork wearing a percentage sign.
What none of this establishes
Every measure here is arithmetic over costs. That gives it a firm boundary.
A margin does not tell you whether a price is achievable. The calculation knows your costs and your target; it knows nothing about demand, competitors, conversion or what a customer would actually pay. A price solved backwards from a target is a mathematical boundary — below it the target is not met — and it is not a recommendation, an optimum or a prediction.
A margin does not tell you whether the business works. Contribution margin excludes fixed costs by design, and every figure here excludes tax, discounts, returns, chargebacks and the cost of acquiring the customer unless you entered them.
And a higher margin is not automatically better. Raising a price raises the margin on every unit that still sells, and says nothing about how many still do. That trade-off is the one thing none of these three measures can see.
What they can do is tell you which number you are looking at, and what it has already stopped counting. Given how much of the published guidance disagrees on exactly that, it is worth being explicit about it in your own figures — including which convention you chose, so that the next person to read them can check.
Sources
Secondary reporting
Reporting that relies on other sources. Used only where primary material is unavailable.
The difference between contribution margin and gross margin
Supports: That in the management-accounting convention the dividing line between gross margin and contribution margin is cost behaviour rather than cost function: gross margin is revenue minus cost of goods sold, where that cost includes fixed overhead such as equipment depreciation and supervisory salaries, while contribution margin is revenue minus all variable costs of sale including commission expense. It states in terms that contribution margin tends to yield a higher percentage than gross margin, because it includes fewer costs.
Cited for the convention it states, not as an endorsement of it. It is one of the two conventions this article reconciles, and the ordering it reports — contribution margin above gross margin — is the opposite of the ordering the ecommerce sources below report. Neither is an arithmetic error; the two classify the same costs differently.
What is the difference between gross margin and contribution margin?
Supports: That gross margin is net sales minus cost of goods sold where that cost contains both variable and fixed manufacturing costs, and that contribution margin is net sales minus variable product costs and variable selling, general and administrative expenses. Its worked figures deduct fixed manufacturing cost inside gross margin and exclude it from contribution margin, so contribution margin is the larger of the two.
Cited as a second independent statement of the same management-accounting convention, so that the convention is not attributed to a single publisher. It describes a manufacturing cost structure and does not address marketplace or payment-processing fees.
COGS in Ecommerce: What It Means, What Counts, and What Most Brands Get Wrong
Supports: That a current ecommerce-operations source places per-transaction payment-processing fees and per-unit third-party-logistics pick, pack and ship fees inside cost of goods sold, and therefore inside gross margin, and treats outbound shipping net of customer payments as a probable cost-of-goods component requiring verification.
Cited for where it places specific cost lines, not as an authority on accounting standards. Its placement of payment-processing fees inside cost of goods sold is directly contradicted by the ecommerce source below, which lists the same line as one gross margin leaves out. That contradiction is the subject of this article and is quoted rather than resolved in either direction.
Why Your Shopify Gross Margin Is Lying to You
Supports: That a current ecommerce-operations source defines gross margin as net sales minus cost of goods sold and states that it excludes payment-processing fees, shipping cost net of shipping revenue, fulfilment cost and refund processing, and that it defines contribution margin as net sales after those same deductions — making contribution margin necessarily lower than gross margin.
Cited for the cost placement it states and for the ordering that follows from it. Its placement of payment-processing and fulfilment fees below the gross-margin line is the direct opposite of the source above, and the ordering it produces is the opposite of the management-accounting sources above. No figure, rate or benchmark from this source is reproduced.
UBWHY's own work
Calculations and reconstructions produced by UBWHY, recorded so the method can be examined. Not independent evidence, and not verification of the records they are built from.
UBWHY Markup vs Margin calculation model
UBWHY Tool Blueprint — Markup vs Margin, blueprint version 1.0, calculation model version “Markup vs Margin v1.0”, last reviewed 5 August 2026. Held in the UBWHY repository and not published as a document.
Supports: UBWHY’s own calculation model and, in particular, the cost-layer conventions this article states: markup measured on direct product cost; gross margin measured on sale price after direct product cost only; contribution margin measured on sale price after every variable cost entered and before fixed monthly costs; percentage fees applied to sale revenue; fixed per-order costs allocated across the entered average units per order; fixed monthly costs excluded from unit contribution margin; the two distinct target-price inversions, cost divided by one minus the gross target against the variable-cost base divided by one minus the fee minus the contribution target; and whole break-even units rounded upward.
UBWHY’s own working specification, not independent evidence, and filed as such. Its arithmetic is verified twice against the published test vectors MM-1 to MM-8: once by an independent specification verifier and once by the production model that renders this site. It contains no marketplace, payment-provider or platform fee rate of any kind, states no benchmark margin, and retrieves nothing at build time or at run time.
Figures that UBWHY calculates, and the conclusions drawn from them, are UBWHY's own work and are labelled as such in the text. They are not claims made by any source above.