Revenue Rex logo mark
💰 Financial · Rex's Toolbox

Shopify DTC Margin Calculator

True margin after payment processing, shipping, and packaging on your own store.

Revenue Rex peeking

Rex says

Money math without the spreadsheet headache. Plug in your numbers and I'll show you exactly where the dollars land.

Try a scenario

Click to load — tweak from there.

Inputs

Result

Contribution margin per order

$35.32

Contribution margin %

54.3%

Payment processing fee

$2.18

Max breakeven ad spend per order

$35.32

Revenue Rex peeking

Psst — share this and help Rex grow

One click, a permanent link with your numbers baked in.

More financial

How to use this

  1. 1Enter average order value ($).
  2. 2Enter product cost per order ($).
  3. 3Enter payment processing rate (%).
  4. 4Enter payment processing flat fee ($).
  5. 5Enter shipping cost you absorb ($).
  6. 6Enter packaging cost per order ($).
  7. 7Read your contribution margin per order on the right — it updates as you type.
  8. 8Hit Share to keep the scenario or send it to someone.

About this calculator

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.

FormulaProcessing fee = AOV × rate% + flat fee; Contribution margin = AOV − COGS − processing fee − shipping − packaging.

Worked example

Using the values the calculator loads with:

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 $

Results

  • Contribution margin per order: $35.32
  • Contribution margin %: 54.3%
  • Payment processing fee: $2.18
  • Max breakeven ad spend per order: $35.32

What each field means

Inputs

Average order value ($)
The average order value used in the calculation, measured in $. Starts at 65 $ so you have a working example on load.
Product cost per order ($)
The product cost per order used in the calculation, measured in $. Starts at 18 $ so you have a working example on load.
Payment processing rate (%)
The payment processing rate used in the calculation, measured in %. Starts at 2.9 % so you have a working example on load. Accepted range: 0–10 %.
Payment processing flat fee ($)
The payment processing flat fee used in the calculation, measured in $. Starts at 0.3 $ so you have a working example on load.
Shipping cost you absorb ($)
The shipping cost you absorb used in the calculation, measured in $. Starts at 8 $ so you have a working example on load.
Packaging cost per order ($)
The packaging cost per order used in the calculation, measured in $. Starts at 1.5 $ so you have a working example on load.

Results

Contribution margin per order
Returned as a money amount in US dollars and shown as the headline result. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Contribution margin %
Returned as a percentage. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Payment processing fee
Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.
Max breakeven ad spend per order
Returned as a money amount in US dollars. It recalculates instantly whenever you change an input, so you can compare scenarios without reloading.

FAQ

Is this the same as gross margin?

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.

Should I include free shipping cost here?

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.

How does this relate to my target ROAS?

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.

What if I sell multiple SKUs with different costs?

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.

Accuracy and 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.

Related tools

Cite this calculator

Writing about this topic? Grab a citation — every link helps keep these tools free.

APA
RevenueLab. (2026). Shopify All-In Margin Calculator. Retrieved from https://www.revenuelab.fyi/toolbox/shopify-margin-calculator
HTML
<p>Source: <a href="https://www.revenuelab.fyi/toolbox/shopify-margin-calculator" target="_blank" rel="noopener">Shopify All-In Margin Calculator — RevenueLab</a> (2026).</p>
Markdown
Source: [Shopify All-In Margin Calculator — RevenueLab](https://www.revenuelab.fyi/toolbox/shopify-margin-calculator) (2026).
Advertisement