Commerce profitability

Contribution Margin Guide for Ecommerce

Contribution margin shows how much revenue remains after the variable costs needed to sell and fulfill an order. For ecommerce teams, the useful version depends on cost inclusion rules, order and order-line grain, allocation assumptions, and whether acquisition spend is part of the question.

Start with gross profit Gross profit subtracts product cost, but it does not capture shipping, fees, fulfillment, or marketing.
Declare costs Contribution profit should name every included variable cost and every excluded cost.
Respect grain Order, order-line, SKU, customer, and cohort views need different allocation rules.
Formulas

Gross profit vs. contribution profit

Gross profit and contribution profit answer related but different questions. Gross profit focuses on product economics. Contribution profit expands the view to variable costs that scale with selling and fulfillment.

Gross Profit

Revenue remaining after product cost.

FormulaNet Sales - Cost of Goods Sold.
UseProduct margin, merchandising, pricing, and SKU-level product economics.
CaveatGross profit excludes shipping, fulfillment, payment fees, marketplace fees, and marketing unless defined otherwise.
COGSGross marginSKU

Contribution Profit

Revenue remaining after selected variable costs.

FormulaNet Sales - COGS - Included Variable Costs.
UseOrder economics, channel sustainability, payback, and operating decisions.
CaveatThe metric is only comparable when included costs and allocation rules match.
Variable costsOrder profitPayback

Gross Margin %

Gross profit as a share of net sales.

FormulaGross Profit / Net Sales.
UseComparing product margin across SKUs, categories, and periods.
CaveatAggregate by summing gross profit and net sales, then recomputing the ratio.
RatioRecomputeProduct margin

Contribution Margin %

Contribution profit as a share of net sales.

FormulaContribution Profit / Net Sales.
UseUnderstanding how much revenue remains after variable operating costs.
CaveatNot the same as net margin because fixed costs, overhead, and some operating costs may be excluded.
RatioVariable costsNet sales
Cost rules

Which costs belong in contribution margin?

There is no useful contribution margin without cost rules. Each cost should have a source, effective date, allocation method, refund behavior, and grain.

Product costs

COGS or landed product cost associated with the items sold.

IncludeUnit cost, landed cost, or a governed cost rule by SKU and effective date.
GrainOrder-line or SKU grain is usually safest because product costs vary by item.
PitfallApplying today's SKU cost to historical orders after supplier costs changed.
COGSSKUEffective date

Discounts and returns

Revenue reductions from promotions, refunds, returns, and cancellations.

IncludeLine discounts, order discounts, refunds, return adjustments, and cancellation logic when applicable.
GrainLine-level when possible; order-level discounts need allocation for SKU analysis.
PitfallMixing order-date sales with refund-date returns without labeling the date basis.
Net salesRefundsAllocation

Shipping and fulfillment

Carrier, label, packaging, pick, pack, handling, warehouse, or 3PL costs.

IncludeActual shipping cost where available, or a documented rule for estimated shipping and fulfillment costs.
GrainOften order-level; allocate by revenue share, item count, weight, or another documented rule for SKU views.
PitfallTreating free shipping as free to the business.
ShippingFulfillment3PL

Payment and marketplace fees

Processor fees, platform commissions, referral fees, and transaction charges.

IncludePercentage fees, fixed fees, marketplace category rates, and refund fee behavior.
GrainTransaction, order, or order-line grain depending on the source and allocation rule.
PitfallUsing one blended fee rate when payment methods or marketplaces have different rates.
Payment feesMarketplaceTransactions

Marketing spend

Acquisition or retention spend used when the question is post-marketing contribution.

IncludeAd spend, affiliate commissions, influencer fees, or broader marketing costs only when the metric name says so.
GrainUsually campaign-day or period grain; allocation to orders requires attribution or another explicit rule.
PitfallSubtracting marketing from every order without explaining whether the spend is attributed, blended, or allocated.
CACROASMER

Excluded costs

Costs intentionally left out of the contribution margin definition.

ExamplesFixed payroll, rent, software, overhead, financing costs, taxes, or corporate allocations.
RuleName excluded costs so contribution margin is not mistaken for net profit.
PitfallCalling a contribution metric net income or fully loaded profit.
OverheadFixed costsNet profit
Grain

Order, order-line, and SKU grain change the answer

Contribution margin should be calculated at the lowest reliable grain, then rolled up. When costs exist at a different grain than revenue, allocation rules become part of the metric definition.

Order grain

Order-level profit is useful for total order economics, customer analysis, and payback. It can keep order-level shipping, fees, and discounts without forcing SKU allocation.

Order-line grain

Order-line profit is useful for SKU, bundle, category, and merchandising decisions. It needs line-level revenue and product cost plus allocation for order-level costs.

SKU grain

SKU margin needs stable product identity, dated cost rules, discount allocation, return handling, and enough transaction detail to avoid relying on blended averages.

Customer economics

How contribution margin relates to CAC and payback

CAC and payback are more meaningful when compared to profit instead of revenue. The right profit basis depends on whether the question is first-order economics, cohort payback, or lifetime value.

First-order contribution profit

Contribution profit generated by a customer's first order.

FormulaFirst Order Net Sales - Included First Order Costs.
UseUnderstanding whether acquisition can be recovered immediately or requires repeat purchases.
CaveatRequires customer identity logic that separates first-time and returning customers.
New customersFirst orderCAC

Contribution payback

Time until cumulative contribution profit recovers acquisition cost.

FormulaTime until cumulative contribution profit is greater than or equal to CAC.
UseEvaluating acquisition sustainability by cohort.
CaveatRequires cohort windows, acquisition spend policy, and repeat purchase timing.
PaybackCohortLTV

Contribution LTV

Observed or modeled contribution profit over a customer lifetime window.

FormulaCustomer Contribution Profit over a defined window.
UseComparing customer value to acquisition cost.
CaveatLabel whether LTV is observed, modeled, revenue-based, gross-profit based, or contribution-profit based.
LTVModeledObserved

Profit-aware ROAS and MER

Efficiency ratios that use profit instead of revenue in the numerator.

FormulaGross Profit or Contribution Profit / Ad Spend or Marketing Spend.
UseAdding profit context to revenue efficiency metrics.
ROASMERProfit
Semantic modeling

How to keep contribution margin trustworthy

Contribution margin is a semantic metric. The cost rules, allocation logic, date basis, and grain should be visible and versioned.

Version cost rules

Product costs, shipping fees, payment rates, marketplace commissions, and fulfillment costs change. Historical orders should use the rule that applied when the order was created or fulfilled.

Keep allocation visible

When an order-level cost is pushed to order lines or SKUs, name the allocation method. Revenue share, item count, weight, and quantity can produce different results.

Separate observed and modeled

Observed fees, actual shipping labels, and transaction costs should be labeled differently from estimated costs, modeled LTV, and forecasted inventory impacts.

FAQ

Contribution margin questions

Contribution margin reporting is strongest when costs, grain, allocations, and customer timing are explicit.

What is contribution margin?

Contribution margin is contribution profit divided by revenue. Contribution profit is revenue after selected variable costs such as COGS, shipping, fulfillment, payment fees, and marketplace fees.

How is contribution profit different from gross profit?

Gross profit usually subtracts product cost from revenue. Contribution profit subtracts additional variable costs, depending on the cost rules used by the business.

Should ad spend be included in contribution margin?

Only when the metric is explicitly post-marketing contribution profit or profit after acquisition spend. Standard contribution margin often excludes ad spend unless defined otherwise.

Why does order-line grain matter?

SKU and product decisions require line-level economics. Order-level discounts, shipping, and fees need documented allocation before they can be used for product-level margin.

How does contribution margin relate to CAC?

CAC should be compared to gross profit or contribution profit when evaluating payback. Revenue alone can overstate how quickly acquisition spend is recovered.

Is contribution margin the same as net profit?

No. Contribution margin usually excludes fixed costs, overhead, financing costs, taxes, and other expenses unless the metric definition says they are included.