{
  "slug": "shopify-margin-calculator",
  "title": "Shopify All-In Margin Calculator",
  "heading": "Shopify DTC Margin Calculator",
  "category": "financial",
  "url": "https://www.revenuelab.fyi/toolbox/shopify-margin-calculator",
  "summary": "True margin after payment processing, shipping, and packaging on your own store.",
  "description": "Shopify sellers often quote 'margin' as retail price minus COGS and ignore the 2.9%+30¢ card processing fee, outbound shipping subsidy, and packaging cost that eat into every order. This calculator rolls all four cost buckets into one number: product cost, payment processing fee, shipping cost you absorb (full or partial), and packaging materials. It reflects the reality of direct-to-consumer selling where you control price and brand but also carry every fulfillment cost yourself, unlike a marketplace where some of that is bundled into a flat fee. Enter your average order value, product cost, the payment processor's percentage and flat fee, average shipping cost you pay per order, and packaging cost per order, and you'll see contribution margin dollars and percentage per order. This is the number that should drive your target ROAS and ad spend ceiling, since it's what's actually left to reinvest in customer acquisition after variable costs, not gross margin before shipping and fees.",
  "formula": "Processing fee = AOV × rate% + flat fee; Contribution margin = AOV − COGS − processing fee − shipping − packaging.",
  "dateModified": "2026-09-30",
  "run_url": "https://www.revenuelab.fyi/api/public/calc?tool=shopify-margin-calculator",
  "inputs": [
    {
      "id": "aov",
      "label": "Average order value",
      "kind": "number",
      "hint": null,
      "default": 65,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "cogs",
      "label": "Product cost per order",
      "kind": "number",
      "hint": null,
      "default": 18,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "processRate",
      "label": "Payment processing rate",
      "kind": "number",
      "hint": null,
      "default": 2.9,
      "unit": "%",
      "min": 0,
      "max": 10
    },
    {
      "id": "processFlat",
      "label": "Payment processing flat fee",
      "kind": "number",
      "hint": null,
      "default": 0.3,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "shipping",
      "label": "Shipping cost you absorb",
      "kind": "number",
      "hint": null,
      "default": 8,
      "unit": "$",
      "min": 0,
      "max": null
    },
    {
      "id": "packaging",
      "label": "Packaging cost per order",
      "kind": "number",
      "hint": null,
      "default": 1.5,
      "unit": "$",
      "min": 0,
      "max": null
    }
  ],
  "outputs": [
    {
      "id": "cm",
      "label": "Contribution margin per order",
      "format": "currency",
      "hint": null,
      "primary": true
    },
    {
      "id": "marginPct",
      "label": "Contribution margin %",
      "format": "percent",
      "hint": null,
      "primary": false
    },
    {
      "id": "processing",
      "label": "Payment processing fee",
      "format": "currency",
      "hint": null,
      "primary": false
    },
    {
      "id": "maxCac",
      "label": "Max breakeven ad spend per order",
      "format": "currency",
      "hint": null,
      "primary": false
    }
  ],
  "worked_example": {
    "inputs": [
      "Average order value: 65 $",
      "Product cost per order: 18 $",
      "Payment processing rate: 2.9 %",
      "Payment processing flat fee: 0.3 $",
      "Shipping cost you absorb: 8 $",
      "Packaging cost per order: 1.5 $"
    ],
    "outputs": [
      "Contribution margin per order: $35.32",
      "Contribution margin %: 54.3%",
      "Payment processing fee: $2.18",
      "Max breakeven ad spend per order: $35.32"
    ]
  },
  "how_to": {
    "title": "How to use this",
    "steps": [
      "Enter average order value ($).",
      "Enter product cost per order ($).",
      "Enter payment processing rate (%).",
      "Enter payment processing flat fee ($).",
      "Enter shipping cost you absorb ($).",
      "Enter packaging cost per order ($).",
      "Read your contribution margin per order on the right — it updates as you type.",
      "Hit Share to keep the scenario or send it to someone."
    ]
  },
  "scenarios": [
    {
      "name": "Conservative",
      "description": "Lower-end numbers — what if things land soft?",
      "values": {
        "aov": 39,
        "cogs": 11,
        "processRate": 1.74,
        "processFlat": 0.18,
        "shipping": 4.8,
        "packaging": 0.8999999999999999
      }
    },
    {
      "name": "Typical",
      "description": "Defaults — the most common real-world setup.",
      "values": {
        "aov": 65,
        "cogs": 18,
        "processRate": 2.9,
        "processFlat": 0.3,
        "shipping": 8,
        "packaging": 1.5
      }
    },
    {
      "name": "Ambitious",
      "description": "Higher-end numbers — what if things really pop?",
      "values": {
        "aov": 104,
        "cogs": 29,
        "processRate": 4.64,
        "processFlat": 0.48,
        "shipping": 12.8,
        "packaging": 2.4000000000000004
      }
    }
  ],
  "limitations": [
    "Results are estimates before tax, fees, and inflation unless an input explicitly covers them.",
    "Rates are treated as fixed for the whole period — variable-rate products will drift from this projection.",
    "This is educational maths, not financial advice. Check anything contractual with the lender or your accountant."
  ],
  "faq": [
    {
      "q": "Is this the same as gross margin?",
      "a": "No. Gross margin usually stops at COGS. This is contribution margin, which also nets out variable fulfillment costs like payment processing, shipping you subsidize, and packaging. It's a stricter and more useful number for setting ad spend limits."
    },
    {
      "q": "Should I include free shipping cost here?",
      "a": "Yes, whatever shipping cost you actually pay or absorb should go in the shipping field, even if the customer sees 'free shipping' at checkout. The cost still hits your P&L."
    },
    {
      "q": "How does this relate to my target ROAS?",
      "a": "Your max breakeven ad spend per order divided by AOV gives you the minimum ROAS you need just to break even on that order, ignoring fixed costs. Add a profit buffer of 20-40% on top for a realistic target ROAS."
    },
    {
      "q": "What if I sell multiple SKUs with different costs?",
      "a": "Run this per SKU or per product category rather than blending an average AOV, since a $150 order with $90 COGS behaves very differently than a $40 order with $8 COGS even at similar dollar margins."
    }
  ],
  "related": [
    "https://www.revenuelab.fyi/toolbox/break-even-roas",
    "https://www.revenuelab.fyi/toolbox/blended-cac-mer",
    "https://www.revenuelab.fyi/toolbox/free-shipping-threshold"
  ],
  "license": "CC-BY-4.0",
  "citation": "RevenueLab — Shopify All-In Margin Calculator (https://www.revenuelab.fyi/toolbox/shopify-margin-calculator)"
}