Cost-Layer Framework

The Full Cost-Layer Money Model for Shopify: Why Your Per-SKU Profit Number Is Wrong

Most DTC founders believe they know which SKUs are profitable. They're looking at the wrong cost. This framework walks through all 8 cost layers, from supplier invoice to customer doorstep, so you can calculate a contribution margin number you can actually act on.

Who this is for: $3-12M DTC founders, finance leads, and operators who suspect their 3PL invoice is hiding margin they can't find.

Last updated: May 2026

TL;DR: The bottom line

  • Shopify's margin is wrong: It subtracts COGS from revenue and stops. It has no idea what you pay for 3PL storage, pick/pack, outbound shipping, returns, payment fees, or per-unit royalties. Those costs routinely consume 15-25% of revenue for a $5-12M Shopify brand.
  • There are 8 cost layers, not 1: Product cost is Layer 1 of 8. Until you've subtracted all 8 from each SKU's revenue, you don't have a margin number. You have a guess. If you pay per-unit royalties or revenue-share on licensed products, treat those as part of the variable cost stack too, not overhead.
  • The 3PL invoice is the leak: Brands with 20+ SKUs routinely discover that 3PL storage, special-handling, and dimensional-weight surcharges are not allocated per SKU anywhere in their reporting stack. This is where the $40K reconciliation problem lives.
  • Licensing & creator deals are variable costs: Per-unit royalties, revenue-share, and influencer/affiliate commissions must be treated like COGS, not as "marketing overhead," or you'll overspend on ads and underprice licensed SKUs.

Target: True contribution margin ~35-45% after all 8 layers, per SKU, before overhead allocation.

Below ~35% true contribution margin per SKU, it's structurally hard to scale paid acquisition and still make money.

How to calculate true profit per SKU in Shopify (8 cost layers, not 1)

To calculate true profit per SKU in Shopify, subtract all 8 cost layers from each unit's revenue, not just COGS. In order, those layers are: (1) product cost, (2) inbound freight & duties, (3) 3PL receiving & storage, (4) pick, pack & fulfillment, (5) outbound shipping, (6) payment processing, (7) returns & restocking, and (8) platform fees. Shopify's native margin subtracts only Layer 1, which is why it overstates true per-SKU profit by 20-30 percentage points. The rest of this page defines each layer, walks a full worked example, and gives you the exact formula.

Why your current margin number is wrong

A DTC founder at a $10M consumables brand recently said: "My 3PL invoice has $40K of fees I can't reconcile. I don't know which SKUs are profitable and which are burning cash."

This is not a bookkeeping problem. It is a structural problem with how most DTC businesses think about cost.

Shopify's margin report subtracts COGS from revenue. That's Layer 1 of 8. Your Shopify dashboard has no idea what it cost to get that unit into the warehouse, how much the 3PL charged to pick and pack it, what UPS charged to deliver it, or how much of it came back as a return. None of that is in the number you're looking at.

So when you run a promotions analysis, a channel mix decision, or a SKU rationalization exercise using Shopify margins, you're not making a data-driven decision. You're making a guess dressed up in a spreadsheet.

The fix is not a better spreadsheet. The fix is a full cost-layer model: a single framework that maps every dollar of variable cost from supplier invoice to the customer's door, allocated to each SKU, so that contribution margin is a real number rather than an estimate.

The 8 cost layers, defined

These are the 8 layers every physical DTC brand incurs between sourcing a product and collecting the revenue from selling it. Some brands have fewer layers (e.g., Shopify Fulfillment instead of a 3PL). Most $3-12M brands have all 8.

Layer 1: Product cost (supplier invoice)

This is what you pay the supplier per unit. This is the number most brands put into Shopify's "cost per item" field. In practice it usually covers only the product itself (not freight, 3PL, shipping, returns, or license royalties), so Shopify's margin is almost always a one-layer guess.

  • What to include: The unit price on the purchase order. If you manufacture domestically, this is your manufacturing cost per unit. Include any per-unit royalties or license fees tied to this SKU (licensed IP, collabs, print-on-demand base cost).
  • What not to include: One-time or long-term minimum guarantees and lump-sum license fees. Those behave like overhead and sit outside contribution margin.
  • Common mistakes: Using list price instead of net price after volume discounts. Not accounting for minimum order quantities that inflate effective per-unit cost for slow-moving SKUs. Ignoring per-unit royalties or licensing percentages and treating them as overhead, which makes licensed SKUs look far more profitable than they are.
  • Allocation method: Direct, one number per SKU.

Layer 2: Inbound freight & import duties

The cost of moving inventory from the supplier to your warehouse or 3PL. For brands importing from overseas, this includes ocean freight, air freight, customs broker fees, and import duties.

  • What to include: Ocean/air freight per container, customs brokerage, import duties and tariffs, drayage from port to warehouse.
  • Common mistakes: Treating freight as a period cost instead of allocating it to inventory. Not updating duty rates after tariff changes. Missing drayage in the landed cost calculation.
  • Allocation method: Allocate by cubic volume or weight of each SKU in the shipment. Most freight forwarder invoices are per shipment. You must split across SKUs manually or via a landed cost tool.

Layer 3: 3PL receiving & storage

Your 3PL charges to receive each inbound shipment and to store your inventory in their facility. These costs are often billed monthly and are among the most commonly misallocated in DTC P&Ls.

  • What to include: Receiving fees (per pallet or per carton), monthly storage fees (per pallet position or cubic foot), long-term storage surcharges, special project fees for inventory counts or relabeling.
  • Common mistakes: Treating all receiving and storage as overhead rather than allocating by SKU. Not flagging slow-moving SKUs that are accumulating storage fees against zero or minimal revenue.
  • Allocation method: By cubic volume of inventory on hand. Slow-moving SKUs with large cube absorb disproportionate storage cost. This is why SKU rationalization decisions require this layer.

Layer 4: Pick, pack & fulfillment

The per-order cost your 3PL charges to pick units from shelves, pack them into a shipping box, insert any kitting components, and hand off to the carrier. This is the most variable layer and the core of the "3PL invoice parsing" problem.

  • What to include: Per-order pick fees, per-unit fees, packing materials (DIM'd boxes, void fill, inserts), kitting and assembly fees, special handling surcharges (hazmat, refrigeration, oversized).
  • Common mistakes: Using a blended per-order fee across all SKUs regardless of unit count, size, or special handling. Not including insert costs per SKU. Not capturing dimensional-weight box upgrades when a SKU forces a larger box.
  • Allocation method: Per order line item where possible. For multi-SKU orders, allocate by unit count or box contribution.

Layer 5: Outbound shipping

The carrier cost to deliver the order to the customer. For most DTC brands, this is the second-largest variable cost after product cost itself.

  • What to include: Carrier base rate, fuel surcharge, residential delivery surcharge, delivery area surcharge (DAS), adult signature requirement, Saturday delivery premium.
  • Common mistakes: Using the negotiated base rate without adding surcharges (which can add 30-60% to base rates). Not accounting for actual dimensional weight billing vs. stated product weight. Ignoring zone-based rate differences across the customer base.
  • Allocation method: Per shipment. For multi-unit or multi-SKU shipments, allocate by DIM weight contribution of each SKU.

Layer 6: Payment processing

The fee charged by your payment processor on each transaction. On Shopify Payments, this is typically 2.4-2.9% + $0.30. On third-party processors, add the Shopify transaction fee (0.5-2%).

  • What to include: Processing rate on transaction value, per-transaction fee, international card surcharges, currency conversion fees, chargeback fees allocated by SKU return rate where data is available.
  • Common mistakes: Using a flat % estimate instead of actual blended rates. Not capturing international surcharges. Ignoring chargeback costs, which can be material for high-ticket or high-fraud categories.
  • Allocation method: As a % of revenue per SKU. This layer self-allocates by price.

Layer 7: Returns & restocking

The cost of processing and restocking returned merchandise. This is the most frequently omitted cost layer in DTC P&Ls, and the one most likely to make a high-return-rate SKU look profitable when it isn't.

  • What to include: Return shipping label cost (if you provide prepaid returns), 3PL return receiving and inspection fee, restocking labor, disposition cost for unsellable returns (refurbish, donate, or destroy).
  • Common mistakes: Only deducting the COGS for returned units, not the full cost of processing the return. Not tracking return rate by SKU to apply the correct per-unit burden. Treating returns as a revenue adjustment rather than a cost line.
  • Allocation method: Apply a per-unit return burden (total return processing cost ÷ units sold) at the SKU level using that SKU's actual return rate.

Layer 8: Platform & transaction fees

The Shopify subscription and app fees attributable to revenue generation. These are often treated as fixed overhead, but for a $3-12M brand they are large enough to matter in per-SKU math.

  • What to include: Shopify monthly subscription (allocated as % of revenue), Shopify app fees that are variable or revenue-correlated (review apps, subscription billing apps, post-purchase upsell apps), affiliate network and influencer-platform fees charged as a % of order value or per attributed order, and marketplace or channel commissions on Shopify-originated orders (where applicable).
  • What to leave out: Purely fixed software costs (team tools, project management) go into overhead, not contribution margin. Leave out flat retainers or long-term minimum-spend commitments to influencer platforms or agencies. Those behave like overhead and sit outside contribution margin.
  • Allocation method: As a % of revenue. Divide total attributable platform costs by total revenue to get a blended rate, apply per SKU. For per-order or per-sale commissions (affiliates, influencers), allocate cost to the orders or SKUs that triggered the payout. If you can't cleanly attribute, allocate pro-rata by revenue within the campaign window.

Worked example: $10M consumables brand, one SKU

Here's what all 8 layers look like for a single SKU (a 30-unit supplement bottle at $65 retail) at a $10M/year DTC brand.

Cost Layer Per Unit ($) % of Revenue
Revenue $65.00 100%
Layer 1: Product cost - $14.00 21.5%
Layer 2: Inbound freight & duties - $2.10 3.2%
Layer 3: 3PL receiving & storage - $0.85 1.3%
Layer 4: Pick, pack & fulfillment - $3.20 4.9%
Layer 5: Outbound shipping - $8.40 12.9%
Layer 6: Payment processing - $1.95 3.0%
Layer 7: Returns & restocking - $1.30 2.0%
Layer 8: Platform fees - $0.65 1.0%
True Contribution Margin $32.55 50.1%
Shopify's reported margin (Layer 1 only): 78.5%, off by 28 percentage points

The supplement brand's Shopify dashboard shows a 78.5% gross margin on this SKU. The full cost-layer model shows 50.1%. The difference is 28 percentage points, enough to completely change a channel mix decision, a pricing decision, or a scale/kill decision for that product.

If this SKU also carried a 15% royalty on net revenue, true contribution margin would drop from ~50% into the mid-30s, which is the difference between a scalable hero and a barely break-even product.

Now multiply this across a 30-SKU catalog. You will find that some products you thought were your best performers are actually your margin eroder SKUs, and some you were planning to phase out are quietly carrying the catalog. The cost-layer model is the only way to see this.

Per-SKU contribution margin: the formula

In this framework, "Revenue" means net revenue for that SKU: after discounts, coupons, and gift cards, excluding refunded revenue. If you run heavy discount or affiliate codes, start from the actual cash collected, not list price.

With all 8 layers defined, the per-SKU contribution margin formula is:

// Per-SKU Contribution Margin ($)
CM = Revenue
    - Layer 1 (product cost)
    - Layer 2 (inbound freight + duties)
    - Layer 3 (receiving + storage)
    - Layer 4 (pick + pack + fulfillment)
    - Layer 5 (outbound shipping)
    - Layer 6 (payment processing)
    - Layer 7 (returns × return rate)
    - Layer 8 (platform fees)

// Per-SKU Contribution Margin (%)
CM% = CM / Revenue × 100

If you pay a % of revenue royalty or revenue-share on a SKU, treat it as a variable cost in this stack: either fold it into Layer 1 as part of unit cost, or break it out explicitly as "Royalties = royalty_rate × net revenue." The key is that it gets subtracted before you call the SKU profitable.

This number, and only this number, tells you which products in your catalog are generating real profit after every dollar it costs to get them to a customer.

What to include vs. exclude: Contribution margin stops at variable costs. It does not include fixed overhead (team salaries, rent, software subscriptions that don't scale with orders). Fixed costs go into operating expenses, above the EBITDA line. Contribution margin is the number that tells you whether it's worth selling one more unit, not whether the whole business is profitable.

How to handle licensing, affiliates, and influencer deals

Licensed stores and influencer/affiliate programs add extra variable costs that don't show up in Shopify at all: royalties, stacked discounts, and commission payouts. If you leave them out of the cost-layer model, you'll think high-volume SKUs and "successful" campaigns are winners when they're actually burning cash.

  • License royalties: If you owe 13-15% of net revenue to a licensor, treat that % as a variable cost per unit (royalty_rate × net revenue per unit) and include it in contribution margin, not overhead.
  • Discounts from affiliate/influencer codes: The discount is already baked into net revenue. Your revenue line must be post-discount or you'll overstate margin.
  • Influencer / affiliate commissions and platform fees: Per-order or %-of-sales payouts belong in your variable cost stack alongside payment and platform fees, not in a generic "marketing" bucket.

How to parse your 3PL invoice per SKU

The 3PL invoice is the hardest layer to allocate because it arrives as a single PDF for all SKUs, all orders, and all activity types, often with line items that don't map cleanly to specific products.

Here's how to approach it systematically:

  1. Categorize every line item. Every line on your 3PL invoice belongs to one of four buckets: receiving, storage, pick/pack/fulfillment, or special projects. Label them.
  2. Separate order-level from inventory-level charges. Pick fees and outbound handling are per-order or per-unit, so tie them to order data. Storage is per-cubic-foot, so tie it to inventory position data.
  3. Get the order-level detail file. Most 3PLs provide an order export or API. Match each order to its line items, then to the SKUs it contained. This converts the invoice from a period cost to a per-SKU-per-order cost.
  4. Calculate storage allocation by SKU cube. For storage fees: (SKU cubic feet on hand ÷ total cubic feet on hand) × monthly storage charge = that SKU's storage cost for the month.
  5. Flag and investigate any unallocated line items. If you can't assign a line item to a specific SKU or order type, that's the $40K problem. Work with your 3PL to get a breakout. If they can't provide one, request the underlying activity log.

This process is tedious to do manually for more than a handful of SKUs. For catalogs of 15+ SKUs, it requires either a dedicated analyst running it monthly or software that connects directly to the 3PL API and order management system. The alternative is continuing to guess.

How MarginOS automates all 8 layers

Manually running the full cost-layer model every month is a 2-4 hour exercise per SKU once you have the data sources connected. For a 30-SKU catalog, that's a part-time job. It's why most DTC brands never do it, and why most DTC founders are making million-dollar catalog and channel decisions on Shopify's one-layer margin numbers.

What MarginOS connects to solve this

MarginOS ingests all 8 cost layers automatically from the data sources you already have:

  • Shopify: Revenue, COGS (Layer 1), payment processing rates (Layer 6), Shopify app costs (Layer 8).
  • 3PL API or EDI: Order-level pick/pack fees (Layer 4), receiving fees (Layer 3), storage allocation (Layer 3), special handling charges.
  • Freight forwarder / landed cost file: Inbound freight and duties per PO (Layer 2), allocated to inventory by cubic volume.
  • Carrier billing file: Actual carrier cost per shipment including all surcharges (Layer 5).
  • Returns data: Return rate by SKU from Shopify or a returns platform, plus 3PL return processing fees (Layer 7).

Royalty rates, license percentages, and per-order affiliate or influencer commissions can be configured as overrides or rules inside MarginOS so they roll into the same per-SKU contribution margin waterfall automatically.

The output: a live per-SKU contribution margin waterfall

With all 8 layers connected, MarginOS produces a per-SKU contribution margin waterfall in real time, not a monthly spreadsheet exercise. You can see which SKUs are your real profit drivers, which are margin eroders masquerading as revenue drivers, and which are candidates for a price increase, a COGS negotiation, or a catalog exit. This live waterfall is the core of the MarginOS Profit & Inventory Command Center.

This is the foundation for every other profitability decision: channel mix, inventory depth, promotion strategy, and LTGP:CAC modeling all depend on having an accurate contribution margin as a starting point. And because every cost layer in MarginOS is tagged as ACTUAL or ESTIMATED, you always know which parts of the model you can act on today and which still need a data source connected. See Pillar D: Trust the Numbers for how that works.

The full cost-layer model is one of three core pieces of the MarginOS profit framework. It shows you true contribution margin per SKU after every cost layer. The LTGP:CAC model tells you how profitable your customer relationships are over time, and the Trust the Numbers model tells you whether each profit input is ACTUAL or ESTIMATED. Together they tell you which products make real money, how much you can afford to spend to acquire customers, and how hard you can bet on the data.

Use this framework when...

  • Your Shopify dashboard shows 60-70% margin, but when you factor in 3PL, shipping, royalties, and discounts, your bank account tells a different story.
  • Your 3PL invoice has line items you can't attribute to specific SKUs.
  • You're making a SKU rationalization or discontinuation decision.
  • You're evaluating a price increase and need to know which SKUs have margin room.
  • Your LTGP:CAC ratio is below 3:1 and you need to find where margin is leaking.

Key Formulas

// Contribution Margin ($) Revenue - (L1 + L2 + L3 + L4 + L5 + L6 + L7 + L8)
// Contribution Margin (%) CM / Revenue × 100
// Storage allocation per SKU (SKU cubic ft / Total cubic ft) × Storage charge
// Return burden per unit Return processing cost / Units sold × Return rate

Cost Layer Checklist

  • 1 Product cost & per-unit royalties (COGS)
  • 2 Inbound freight & duties
  • 3 3PL receiving & storage
  • 4 Pick, pack & fulfillment
  • 5 Outbound shipping
  • 6 Payment processing
  • 7 Returns & restocking
  • 8 Platform & transaction fees

All 8 layers must be subtracted for a valid contribution margin.

Get Your Profit & Inventory Command Center

See the cost-layer model in real time, not in spreadsheets.

Get your Profit & Inventory Command Center

Or email sales@marginos.com to see the cost-layer model on your own data.