Contribution margin vs gross margin: which one to run a store on
Gross margin is revenue minus the cost of the goods sold. Contribution margin also subtracts the other costs that rise with each order, which for a store are shipping, payment fees and ad spend. Quote gross margin for products and suppliers. Run ads, promotions and growth on contribution margin.
What is the difference between contribution margin and gross margin?
Gross margin is what remains of revenue after the cost of the goods you sold. Contribution margin is what remains after every cost that rises with an order.
gross margin = net revenue - cost of goods sold
contribution margin = net revenue - all variable costs
The two sort costs by different questions. Gross margin asks whether a cost went into the product. Contribution margin asks whether a cost grows when you sell one more.
Shopify's own reports use the first. Its profit reports define gross margin as net sales minus cost, divided by net sales, where cost is the cost per item you entered on each product. A product with $50 of net sales and $30 of cost shows 40%.
The rest of contribution margin's costs mostly live in other systems: the carrier's invoice, the payment processor, the ad platforms. The contribution margin formula guide covers how to assemble them.
Which costs go into each margin?
For a store that buys finished goods, the sorting looks like this.
| Cost | In gross margin | In contribution margin |
|---|---|---|
| Product cost | Yes | Yes |
| Freight to get stock to your warehouse | Yes | Yes |
| Shipping orders out to customers | No | Yes |
| Packing and pick fees per order | No | Yes |
| Payment fees | No | Yes |
| Ad spend | No | Yes, in the after ads version |
| Rent, salaries, software | No | No |
Inbound freight belongs with the goods. The IRS small business tax guide says freight-in on merchandise you purchase for sale is part of cost of goods sold. Discounts and refunds appear in neither column because they come off the top: both margins start from net revenue.
Ad spend is the line people argue about. Compute contribution margin before ads and after ads and label which one you mean. In the example below, ads are the largest single step between the two margins.
What do both margins look like on the same 30 days?
Here both are computed on one period for an example store. These are example figures, not customer results. The example store is far larger than most, so read the shares and ratios, not the totals. The settings are 42% product cost, $7.50 shipping per order, card fees of 2.9% plus 30 cents, and Meta as the only ad channel, over 227,671 orders.
| Line, last 30 days | Amount | Share of net revenue |
|---|---|---|
| Net revenue | $16,610,912.12 | 100.0% |
| Product cost | $6,976,583.11 | 42.0% |
| Gross margin | $9,634,329.01 | 58.0% |
| Shipping to customers | $1,707,532.50 | 10.3% |
| Payment fees | $550,017.71 | 3.3% |
| Contribution margin before ads | $7,376,778.80 | 44.4% |
| Meta ad spend | $4,044,339.00 | 24.3% |
| Contribution margin after ads | $3,332,439.80 | 20.1% |
The three margin lines, net revenue and ad spend come from the example store's figures. The rest is my arithmetic: product cost is net revenue less gross margin, shipping is orders times $7.50, and payment fees are what remains between the two reported margins.
In this example data, not a customer result, the distance from gross margin to contribution margin after ads is $6,301,889.21 in 30 days. That is 37.9 points of revenue, or $27.68 on every order by my arithmetic. A founder quoting 58% and a marketer quoting 20% are describing the same month.
Is contribution margin always lower than gross margin?
For a store, yes. For a manufacturer, it can go the other way.
The reason is fixed production cost. A factory's cost of goods sold can include overhead. The IRS guide lists rent, heat, light, power, insurance and depreciation among the overhead a manufacturer includes when those are direct and necessary expenses of the manufacturing operation. Those costs do not change with one more unit, so contribution margin leaves them out while gross margin subtracts them. A manufacturer with heavy factory overhead and light selling costs can report a contribution margin above its gross margin.
A store that buys finished goods has almost no fixed cost inside its product cost. What it does have is a stack of variable selling costs that gross margin never sees. So contribution margin sits below gross margin, and in the example above it sits 38 points below.
If you read a general accounting page that says contribution margin is the higher of the two, check which kind of business it has in mind.
When is each margin the right one to quote?
Match the margin to the decision.
| Decision | Margin to use | Why |
|---|---|---|
| Negotiating with a supplier | Gross margin | Only product cost changes |
| Setting a product's price | Both | Price moves product margin and fee dollars |
| Ranking products by profitability | Gross margin, then contribution margin per order | Shipping can reorder the list |
| Setting an ad budget or ROAS target | Contribution margin before ads | It is what an order has left to pay for the ad |
| Judging a promotion or free shipping offer | Contribution margin after ads | The offer changes order value, shipping and ad cost together |
| Tax filings and financial statements | Gross profit | It is the figure those documents carry |
The IRS guide has a business figure gross profit before deducting any other expense, which is why accountants start there. Contribution margin is a management number. No tax form asks for it, so each company defines its own, and you should write your definition down.
What goes wrong when gross margin is used for an ad decision?
The break-even point for ads comes out too low.
An ad pays for itself when the margin on the revenue it brings covers the ad dollar. Divide 1 by the margin and you have the revenue needed per ad dollar. On the example figures, by my arithmetic:
from gross margin, 58.0%: 1 / 0.580 = $1.72 of revenue per ad dollar
from contribution margin before ads, 44.4%: 1 / 0.444 = $2.25 of revenue per ad dollar
Take a campaign that returns $2.00 of revenue per dollar spent. Against gross margin it looks profitable: $2.00 times 58% is $1.16 back on each dollar. Against contribution margin it loses: $2.00 times 44.4% is 89 cents, because the orders still had to be shipped and the cards charged. The 53 cents between $1.72 and $2.25 is the room in which a store grows revenue and loses money.
The contribution margin ratio article tracks that ratio month by month.
How do you keep the two margins honest?
Both depend on inputs that drift. Product costs go stale when a supplier raises prices. Shipping rates change. Ad platforms and the store disagree about what was sold.
Three habits help. Update cost per item when a purchase order lands at a new price. Recompute shipping per order from the carrier invoice each month and stop trusting a remembered number. Check that order counts and revenue agree across the store, the ad platforms and analytics before trusting any margin built on them, which is the subject of the ecommerce data reconciliation guide.
Where Cosmic AI fits
Cosmic AI is the product I build. It computes contribution margin from your store and ad data once your costs are set, cross-checks the sources against each other, and says "not enough data" when a cost is missing. Every connection starts at Read only, and you decide per connection whether agents only read, ask first, or act on their own. See the product page or the security page.
Frequently asked questions
What is the difference between gross margin and gross profit?
Gross profit is a dollar amount: revenue minus cost of goods sold. Gross margin is the same figure as a percentage of revenue. A store with $100 of revenue and $42 of product cost has $58 of gross profit and a 58% gross margin.
What is another name for gross margin?
Gross margin is also called gross profit margin. In everyday use, people say gross margin for both the percentage and the dollar amount, so ask which one is meant when a number is quoted to you.
What is contribution margin vs. operating margin?
Contribution margin subtracts only variable costs from revenue. Operating margin goes further and subtracts fixed operating costs as well, such as salaries, rent and software. Operating margin is always the lower of the two.
What does a 30% gross profit margin mean?
It means 30 cents of each sales dollar is left after the cost of the goods sold. Shipping, payment fees, advertising and every fixed cost still have to be paid from those 30 cents.