How to calculate contribution margin in Shopify
Read gross profit on Shopify's Finance Summary. Take off net shipping from Profit margin by order, fees from the Shopify Payments activity report, packing and returns. Divide by net sales, then subtract Meta and Google Ads spend for contribution after ads.
By Joris van Huët, Founder & CEOUpdated 8 min read
Run the numbers for your store: the free contribution margin calculator, or the free Shopify fee calculator.
Usually from three Shopify screens plus your own invoices. Read gross profit on the Finance Summary. Take off shipping from Profit margin by order, fees from the Shopify Payments activity report and your return costs. Divide by net sales, then subtract Meta and Google Ads spend for contribution after ads.
You need one closed quarter, your carrier and warehouse invoices, and both ad accounts. For the fees report you must be the store owner, or a staff member with permission to view payouts. A quarter smooths out the week a pallet of returns lands. The menu paths come from Shopify's, Google's and Meta's own help pages, read on 1 October 2026.
Step by step
- Give every variant a cost. Shopify reports profit only for products and variants that had a cost recorded at the time they sold. Enter what you paid the maker, without taxes or shipping, and repeat it for each variant. Menu path: Products > (product) > Price section > Cost per item > Cost > Save.
- Check how much of your sales carries a cost. The Gross profit breakdown card splits net sales into sales with and without cost recorded. If the uncosted slice is more than a sliver, go back to step 1 before you trust any ratio below. Menu path: Analytics > Reports > Category filter > Finances > Finance Summary > Gross profit breakdown card.
- Read gross profit product by product. It lists net quantity, net sales, cost, gross margin and gross profit for each costed product. Its gross margin already reflects discounts and refunds, because it starts from net sales. Menu path: Analytics > Reports > Category filter > Profit Margin > Gross profit by product.
- Net off shipping. Profit margin by order lists what customers paid for shipping and what your store paid. Product costs, duties and import taxes sit beside them. Net sales leave shipping charges out, so your shipping cost is what you paid minus what customers paid. Menu path: Analytics > Reports > Category filter > Profit Margin > Profit margin by order.
- Add packing and fulfilment from your invoices. None of the reports above holds boxes, filler, pick and pack or warehouse fees. Take them from your packaging supplier and warehouse invoices for the same quarter. Menu path: none, these live in your books.
- Read the payment fees. If you use Shopify Payments, the report's Fees line is the total deducted from your balance for the dates you pick. It leaves out Shopify billing fees and third-party payment providers, so add their statements too. Menu path: Finance > Documents > Shopify Payments activity report.
- Cost your returns. Net sales already take off the value of returned goods, booked as sales reversals on the date the return was processed. What is left to count is return postage you paid and stock you could not sell again. Menu path: Analytics > Reports > Category filter > Finances > Finance Summary > Total sales breakdown card > Sales reversals by order report.
- Do the sum before ads. Start from gross profit and subtract net shipping, packing, fees and return costs. Divide the result by net sales for your contribution ratio, then divide 1 by that ratio for your break-even ROAS. Menu path: none, this step is arithmetic.
- Subtract ad spend for contribution after ads. Meta calls its spend Amount spent; Google Ads calls it Cost, the total spend for all interactions. Take both off your contribution before ads, and what remains pays wages, rent and software. Menu path: Meta Ads Manager > Campaigns > Columns > Customize columns > Apply; Google Ads > Campaigns > Columns > Modify columns > Apply.
A worked example
For illustration, here is one invented quarter in round numbers, laid out in the order of the steps.
| Step | Line | For illustration |
|---|---|---|
| 2 | Net sales, all with cost recorded | €20,000 |
| 3 | Product cost | €9,000 |
| 3 | Gross profit, a 55% gross margin | €11,000 |
| 4 | Shipping paid minus shipping charged | €1,600 |
| 5 | Packing, pick and pack | €600 |
| 6 | Payment fees | €600 |
| 7 | Return postage and unsellable stock | €200 |
| 8 | Contribution before ads, 40% of net sales | €8,000 |
| 9 | Ad spend, Meta and Google Ads together | €5,000 |
| 9 | Contribution after ads, 15% of net sales | €3,000 |
Step 3 alone tells a cheerful story. For illustration, a 55% gross margin puts break-even ROAS at about 1.8x, since 1 divided by 0.55 is 1.82.
Steps 4 to 7 spoil it. In this worked example they take €3,000 more, and contribution before ads lands at €8,000, or 40% of net sales.
One store's Break-even sheet runs the same sum at a 40% margin: 1 divided by 0.40 gives a break-even ROAS of 2.5x. So the honest line in this worked example is 2.5x, not 1.8x. For example, a campaign reporting 2x clears the gross-margin line and still loses money on every order it claims.
Per order, the picture gets sharper. If the quarter held 400 orders, contribution before ads is €20 an order. That is the most the ads can pay to win one without losing money on it.
Then step 9. In this worked example the ads cost €5,000, which leaves €3,000, or 15% of net sales. Say your wages, rent and software cost more than €3,000 for the quarter. Then the shop is busy, the ads look fine, and the quarter still loses money.
What should I check when the margin looks wrong?
- Gross profit looks small next to net sales. Uncosted sales sit in net sales but not in gross profit. Compare gross profit with net sales with cost recorded, then fill in the missing costs.
- A cost change did not move last quarter. Shopify calls the Cost per item field static data. Profit only counts sales that had a cost when they happened. A cost you save today shows up in future sales, not past ones.
- The fees look too low. The activity report covers Shopify Payments only. It also runs with a 3-day data delay, and custom date ranges start on 1 January 2025.
- Returns land in the wrong quarter. A sales reversal is dated when the return is processed, not when the order was placed. A December order refunded in January lowers January's net sales.
- Meta's spend differs from your invoice. Meta calls Amount spent approximate, and it may include billable amounts that have not been invoiced yet. Recent days can move too, since results can take up to 48 hours to process.
- Shipping costs look tiny. Hold the shipping cost total in Profit margin by order against your carrier invoices for the quarter. If the invoices are bigger, use the invoices.
What to do this week
- Run the sum on last quarter. Work through steps 2 to 9 and write both ratios, before and after ads, on one line. Pass: every input has a dated source. Fail: one input is a guess, so mark it and fix that line first.
- Check your costs against the invoices. Because Cost per item is static, hold the cost of your five best sellers against your latest supplier invoices. Pass: the costs match. Fail: a cost is below the latest invoice, so every sale since the price rise shows a margin you do not have.
- Price the most you can pay per order. Divide contribution before ads by last quarter's orders. Set it next to the cost per result of your Meta purchase campaigns. Pass: cost per result sits below it. Fail: it sits above, so each purchase Meta reports costs more than the order leaves.
Check the homework. Your GA4 Attribution paths export already holds the evidence. Causality Engine reads that one file and shows what each channel caused next to what last-click gave it, in 1 to 2 minutes, for €99 once (excluding VAT), refundable within 30 days. Check the homework
Sources, 1 October 2026: Profit reports (Shopify Help Center); Finance reports (Shopify Help Center); Shopify Payments activity report (Shopify Help Center); Amount spent (Meta Business Help Center); Customize columns in Meta Ads Manager (Meta Business Help Center); About columns in your statistics table (Google Ads Help); Add or remove columns in your statistics table (Google Ads Help)
Related answers
Frequently asked questions
Where does Shopify show shipping costs per order?
In the Profit margin by order report: open Analytics, then Reports, and filter the Category to Profit Margin. It lists what customers paid for shipping and what your store paid, next to product costs, duties and import taxes. Check its total against your carrier invoices before you rely on it.Why does Shopify's gross profit leave out some of my sales?
Because Shopify only counts sales of products and variants that had a cost recorded when they sold. The rest shows as Net sales without cost recorded on the Finance Summary. Adding a cost today does not rewrite past sales, so fill costs in before the period you want to measure.Should contribution margin start from net sales or total sales?
Net sales. Shopify's net sales are gross sales minus discounts and sales reversals, without shipping charges or taxes. Total sales add taxes, shipping and fees on top, and the tax was never yours. Count the shipping customers paid separately, against what you paid the carrier.
Go deeper: Causal attribution, explained.
Sixty-second versions of these ideas: Causality Engine on YouTube Shorts.
Keep reading
Terms in this article
- Ad SpendAd Spend is the total amount invested in advertising campaigns. It is measured against Return on Ad Spend (ROAS) to evaluate campaign effectiveness.
- AnalyticsAnalytics is the systematic computational analysis of data. It reveals customer behavior and measures campaign performance.
- AttributionAttribution identifies user actions that contribute to a desired outcome and assigns value to each. It reveals which marketing touchpoints drive conversions.
- CausalityCausality is the relationship where one event directly causes another, essential for identifying specific actions that drive desired outcomes in marketing.
- Google AdsGoogle Ads is an online advertising platform where advertisers bid to display ads, service offerings, and product listings.
- IncrementalityIncrementality measures the true causal impact of a marketing campaign. It quantifies the additional conversions or revenue directly from that activity.
- Incrementality TestingIncrementality Testing measures the additional impact of a marketing campaign. It compares exposed and control groups to determine causal effect.
- Profit MarginProfit margin measures profitability, calculated as net income divided by revenue and expressed as a percentage.