---
title: Ecommerce Unit Economics — A Contribution Margin Template
description: Calculate ecommerce unit economics with net revenue, COGS, payment fees, fulfilment, returns, contribution margin, CAC, and first-order profitability.
source: https://pingvera.com/blog/ecommerce-unit-economics.html
---
# Ecommerce Unit Economics: A Contribution Margin Template

Ecommerce unit economics measures how much money remains from a fulfilled order after the variable costs required to win and serve it. A useful calculation includes discounts, cost of goods, payment fees, pick and pack, merchant-funded shipping, expected returns, marketplace commissions, and customer acquisition cost.

The model helps a business decide whether to scale a campaign, approve a discount, prioritise retention, or invest in protecting checkout and order fulfilment.

## At a glance

Start with two equations:

**Order contribution margin = net revenue − COGS − variable operating costs − expected return cost.**

**First-order contribution after acquisition = order contribution margin − new-customer CAC.**

Use fulfilled and retained orders rather than every order created in the storefront. Treat the order management, payment, and finance systems as the financial record; use web analytics to explain the journey and acquisition source.

## Choose the right unit

Do not blend channels with materially different fees, return rates, or fulfilment costs. A website order and marketplace order can have the same basket value but very different economics.

## Build the calculation

### 1. Net revenue

Define net revenue consistently:

**Net revenue = item revenue − discounts − customer refunds.**

Taxes, duties, and shipping charged to the customer should follow the company’s approved management-accounting treatment. Document the rule rather than switching definitions between dashboards.

### 2. Cost of goods sold

Use the cost of the units actually fulfilled and retained. Define how bundles, gifts, samples, and exchange-rate changes are handled.

### 3. Variable operating costs

Common items include:

- payment processing;
- marketplace commission;
- pick, pack, and packaging;
- merchant-funded delivery;
- usage-based fraud or identity checks;
- transaction-based messaging;
- variable customer support;
- loyalty credits and cashback;
- per-order software or integration charges.

Fixed payroll and platform subscriptions still matter. They are usually analysed separately through the break-even point: total contribution must cover fixed costs and investment.

### 4. Returns, cancellations, and failed fulfilment

An order confirmation is not a retained sale. Calculate economics by category and channel:

**Expected contribution of a created order = contribution of a retained order × probability of fulfilment and retention.**

Include reverse logistics, non-resellable items, support, and payment fees that are not recovered where applicable.

### 5. Customer acquisition cost

**New-customer CAC = acquisition spend / verified new customers acquired.**

State the attribution window and customer identity rule. Sessions, leads, and created orders are not customers. Separate blended CAC from paid-channel CAC and first-order profitability from lifetime-value scenarios.

## Copyable worksheet

## Worked example

Assume a retained order has net revenue of $120. COGS is $62, payment fees are $3.60, pick and pack is $5, merchant-funded shipping is $9, and expected return cost is $6.

Contribution before acquisition:

**$120 − $62 − $3.60 − $5 − $9 − $6 = $34.40.**

If verified new-customer CAC is $30, the first order contributes $4.40 before fixed costs. A repeat order may be more attractive, but only if retention is demonstrated by cohort data rather than assumed.

These are illustrative numbers, not a benchmark.

## Connect unit economics to reliability

This is why a business should monitor the revenue path, not only homepage uptime. Reliability work can be prioritised by contribution margin at risk.

## A 30-minute weekly review

1. Reconcile created, paid, fulfilled, and retained orders.
2. Identify channels and categories with material margin changes.
3. Decompose the change into price, discount, COGS, fees, returns, and CAC.
4. Check for a technical or data-quality event during the period.
5. Assign one action with an owner and deadline.
6. Review the result using the same definition next week.

## Common mistakes

- treating gross merchandise value as profit;
- measuring created rather than retained orders;
- omitting return and delivery costs;
- averaging channels with different economics;
- comparing new-customer CAC with margin from all customers;
- using optimistic lifetime value without cohort evidence;
- treating browser analytics as financial reconciliation;
- increasing ad spend while checkout is partially broken.

## FAQ

### What is a good ecommerce contribution margin?

There is no universal percentage. Product mix, fulfilment, returns, acquisition strategy, and fixed costs differ. Use the metric to compare your own channels and decisions consistently.

### Should payroll be included?

Include truly variable labour when it scales with orders. Analyse stable payroll and other fixed costs at the business break-even level.

### Why do analytics revenue and finance revenue differ?

Common reasons include blocked scripts, duplicate purchase events, refunds, tax treatment, currency conversion, offline orders, and different recognition dates. Reconcile using order IDs and documented definitions.

## Sources and further reading

- [Shopify: ecommerce data analytics](https://www.shopify.com/blog/ecommerce-data-analytics)
- [Stripe: payment KPIs](https://stripe.com/resources/more/payment-kpis-metrics-that-reveal-where-your-revenue-is-leaking)
- [Google Analytics: measure ecommerce](https://developers.google.com/analytics/devguides/collection/ga4/ecommerce)

Reviewed: **10 August 2026**.

Next: [calculate the cost of website downtime](20-cost-of-website-downtime.md) and [map critical customer journeys](07-critical-user-journey-monitoring.md).

Pingvera can connect failures in checkout, payment, and order delivery to the part of unit economics they put at risk.
