Now in open beta — close the books in 2 days, not 2 weeks.Read the case study →
E-commerce · April 12, 2026 · 8 min read

Shipping cost allocation: true ecommerce margins

Customer-paid shipping rarely covers actual shipping cost, and the gap is buried in operating expense rather than COGS. Without allocating shipping to the order, your gross margin per SKU is wrong. Here is the allocation framework that surfaces the real number.

Inbound vs outbound landed cost.

Inbound landed cost is the cost to get goods into your warehouse: freight, customs, duty, port, inland transport. This is well-discussed: it adds to inventory cost basis and flows through COGS at sale. Most accounting setups handle this.

Outbound landed cost is the cost to get goods out to the customer: courier fee, packaging, fulfillment labor. This is poorly handled. Many merchants charge the customer a flat shipping rate, book it as Shipping income, then book actual courier costs as Shipping expense in operating expenses. The gap is real but buried.

The allocation method.

Allocate outbound shipping to COGS, not to operating expense. On a $42 order with $2 customer-paid shipping and $3.50 actual courier cost, the journal posts Sales $42, Shipping income $2, Shipping expense $3.50 — but with the allocation, you can see net outbound shipping margin of negative $1.50 per order.

Some merchants prefer to gross-up cost: include the $3.50 in Shipping expense in COGS (so unit COGS includes a shipping component). Others keep them separate but report net shipping margin as a sub-line. Either way works as long as you track per-order shipping cost vs revenue, not aggregate monthly numbers.

Order — $42 + $2 shipping (true gross margin)DEBITCREDITShopify clearing44.00Sales42.00COGS — inventory9.80Shipping income2.00COGS — shipping3.50Inventory9.80Shipping payable3.50TOTAL DR57.3TOTAL CR57.3
Shipping in COGS makes the -$1.50 outbound margin visible per order, not buried in opex.

Per-order vs per-shipment.

Some orders ship in multiple parcels. A bundle of three large items might ship in two boxes. The shipping cost is the sum of two parcel costs. Per-order shipping margin needs to aggregate across parcels.

For large-format items (furniture, electronics) where weight tiers force splits, a $2 customer-paid flat rate may cover one parcel at $1.50 actual but a two-parcel order costs $3 actual. The first looks profitable, the second is loss-making. Without per-order parcel-aggregation, the loss is invisible until aggregate analysis.

Packaging cost.

Packaging is a real cost: boxes, void fill, branded inserts, thank-you cards. A typical DTC brand spends $0.30-0.80 per order on packaging depending on size and brand investment. This is operationally part of fulfillment, accountingly part of either COGS or Selling expense.

Track packaging as its own sub-account. Allocate per order based on package size or weight class. A $0.60 packaging cost on a $42 order is 1.4% of revenue; across 1,000 orders/month that is $600 of expense that hides in "Office supplies" or "Misc" in many setups.

  • Boxes: per-order based on size class
  • Void fill (paper, peanuts): per-order based on volume
  • Branded inserts: per-order flat
  • Thank-you cards, samples: per-order flat or campaign-based

Fulfillment labor.

The pick-pack-ship labor is fulfillment. In a 3PL setup, this is the per-order fee charged by the 3PL ($0.80-1.50 typical in mature markets). In an in-house setup, it is the salary of warehouse staff allocated to orders processed.

In-house allocation: total monthly warehouse salary divided by total orders processed equals per-order fulfillment labor cost. If a 3-person warehouse team costs $1,800/month and processes 4,000 orders, fulfillment labor is $0.45/order. This per-order cost flows into COGS or Operating expense based on your classification choice.

Cross-border shipping economics.

Cross-border outbound shipping costs are higher and more variable. A $8 air shipment to a European customer, plus DDP duty plus destination VAT prepaid by you. If the customer paid $5 shipping, the gap is $3 plus duty plus VAT, easily $10-15 negative shipping margin per order.

For cross-border ecommerce to be profitable, the gross margin on the SKU must cover negative shipping margin. A $50 SKU with $15 COGS sells for €45 in the EU; allowing for FX conversion, gross is $48, COGS $15, contribution gross margin $33. Negative shipping margin of $10 leaves $23 net contribution. That math has to work; if the SKU is too cheap, cross-border shipping eats the margin.

Free shipping codes and the math.

A "free shipping over $50" code is a margin lever. Each order under $50 has shipping income that partly covers cost. Each order over $50 has zero shipping income but full shipping cost. The threshold should be set such that the increased AOV compensates for the lost shipping income.

Worked example: average order is $35 with $4 shipping income and $6 actual cost (negative $2 shipping margin). Free shipping over $50 lifts AOV to $58 with zero shipping income and $7 actual cost (negative $7 shipping margin). The $5 worse shipping margin must be compensated by the $23 higher AOV at SKU contribution margin. If SKU margin is 50%, the higher AOV adds $11.50 of margin, net positive $6.50. If SKU margin is 25%, the higher AOV adds $5.75, net positive $0.75. Math the threshold to your category.

Before (no free ship)AOV $35Ship income $4 / cost $6 = -$2SKU margin (50%) = $17.50Net unit: $15.50After (free > $50)AOV $58 (+$23)Ship income $0 / cost $7 = -$7SKU margin (50%) = $29Net unit: $22 (+$6.50)
Free-shipping threshold is +$6.50/unit at 50% SKU margin. Drops to +$0.75 at 25% margin. Math your threshold to your category.

Where Nonari fits.

Nonari ingests courier invoices and packaging consumption per order. Per-order shipping margin (income minus actual cost) is reportable per SKU, per courier, per branch. Free shipping code analysis flows from the same data: which codes drove AOV lift sufficient to compensate for negative shipping margin, and which did not.

For merchants running both domestic and cross-border, the per-branch model means shipping economics are visible per market. A USD-priced cross-border SKU showing strong contribution before shipping and weak after tells you to reconsider your storefront pricing or SKU mix. The accounting layer surfaces what would otherwise be a bunch of monthly aggregate numbers that hide bad unit economics in good ones.

Frequently asked

Common questions.

Should outbound shipping go in COGS or operating expense?

Either is defensible if applied consistently. The important thing is to track per-order shipping margin (income minus cost) so unit economics are visible.

Where does packaging cost go?

A separate sub-account, allocated per order. Hiding it in Office supplies obscures real unit economics.

How do I set a free-shipping threshold?

Calculate the AOV lift needed to compensate for the lost shipping margin at your category contribution margin. Above the breakeven AOV lift, free shipping is accretive.

Does cross-border shipping need different treatment?

Same framework, different magnitudes. Cross-border negative shipping margin is larger and SKU margin must be high enough to absorb it.

Does Nonari track per-order shipping margin?

Yes. Courier invoices ingest per order, packaging is allocated, and shipping margin is reportable per SKU, per courier, per branch.

Try nonari

Put your books on autopilot.

Free to start. No credit card. Bring your books, kick the tires, export everything if you decide to leave.