Export your Orders CSV from Shopify Admin → Orders → Export. Use 90 days for a representative sample that covers at least one promotional period.
Shopify Profit Framework
Shopify Margin Leak Calculator
A margin leak is profit that disappears between your listed price and your actual net margin. For Shopify stores, leaks come from four sources: discount drag, shipping overruns, stale COGS, and fee drag.
This page is a calculation framework — not an interactive tool. Apply the four formulas to your own order data to estimate your total annualized margin leak. A worked example using fictional data is below.
Four formulas for calculating Shopify margin leaks
| Leak type | What it is | Formula | Data source |
|---|---|---|---|
| Discount drag | Discount codes that push order margin below zero | Sum of (COGS + Carrier Ship. + Fee − Net Revenue) for orders where that result > 0 | Orders CSV + product cost records |
| Shipping overrun | Carrier cost exceeds what you charged the customer | Sum of (Carrier Cost − Customer Shipping Charge) where Carrier Cost > Customer Charge | Orders CSV + carrier invoices |
| COGS gap | Shopify cost records behind current supplier pricing | Sum of (Current Supplier Cost − Shopify Cost per Item) × Units Sold | Shopify product export + supplier invoices |
| Fee drag | Transaction and app fees on thin-margin orders | Sum of (Transaction Fee + App Fees) for orders where gross margin % < 15% | Shopify Payments report + app billing |
Sample margin leak calculation: fictional store, 100 orders/month
All numbers below are fictional and illustrative. They show how to apply the four formulas and annualize the result. Substitute your own data in each row.
| Leak type | Monthly orders | Avg. leak per order | Monthly leak | Annual leak |
|---|---|---|---|---|
| Discount drag | 12 orders with discount codes pushing margin negative | $6.20 average loss per order | −$74.40 | −$892.80 |
| Shipping overrun | 28 orders where carrier cost exceeded flat charge | $3.80 average overrun per order | −$106.40 | −$1,276.80 |
| COGS gap | Supplier raised price $1.50 on top SKU (40 units/mo) | $1.50 per unit | −$60.00 | −$720.00 |
| Fee drag | 22 thin-margin orders | $1.40 in fees per order | −$30.80 | −$369.60 |
| Total margin leak | Across 100 orders/month | −$271.60 | −$3,259.20 | |
In this fictional example, the store leaks $3,259 per year across 100 monthly orders. The largest single source is shipping overrun ($1,277/yr). Fixing flat-rate shipping on heavier products is the highest-ROI change in this scenario.
Apply these formulas to your own data. Your leak mix will differ — COGS gaps tend to be larger for stores that have not reviewed product costs in 6+ months.
You need actual carrier costs (not what Shopify estimated), and current supplier invoices to compare against the Cost per item field in Shopify.
Calculate discount drag, shipping overrun, COGS gap, and fee drag separately. Keeping them separate helps you see which source is largest and which is easiest to fix.
Multiply 90-day totals by four. Rank the four leak types by dollar impact. Address the largest first — usually shipping overrun or discount drag.
Connected guides
Find Negative-Margin Orders in Shopify
The 7-step spreadsheet process for identifying individual orders where you lost money, including a sample order table.
Read the guide →Shopify Product SEO Audit
A 10-point checklist to audit every product page for missing meta descriptions, alt text, and other SEO gaps.
Run the audit →ProfitPulse AI for Shopify
Automates the margin leak detection process — surfaces negative-margin orders and low-margin products inside your Shopify dashboard.
See the app →Questions about Shopify margin leaks
What is a margin leak in a Shopify store?
A margin leak is profit that disappears between your listed price and your actual net margin. For Shopify stores, leaks typically come from discount drag, shipping overruns, stale COGS, and fee drag on thin-margin orders.
How do I calculate margin leaks without a dedicated tool?
Export your Orders CSV, gather carrier invoices and current product cost records, then apply the four formulas described on this page. Each leak type requires a different data source, which is why many merchants underestimate their total leak by only checking one or two sources.
Is this page an interactive calculator?
No. This is a calculation framework with formulas and a worked example using fictional data. You apply the formulas to your own Shopify order data. ProfitPulse AI automates this process inside your Shopify dashboard.
What is a typical margin leak rate for Shopify stores?
There is no universal benchmark — it depends on your product category, discount strategy, and shipping carrier mix. The goal of this framework is to measure your specific leak rather than compare to an industry average.
How often should I audit for margin leaks?
At minimum, review discount codes and shipping costs quarterly. After any new promotional campaign or supplier price change, run the calculation again. Stale COGS is especially easy to miss because Shopify does not alert you when supplier prices change.
Track margin leaks automatically.
ProfitPulse AI connects to your Shopify store and surfaces discount drag, shipping overruns, and low-margin products — without a manual spreadsheet process.