Profitability

Ecommerce Profit Margin: How to Calculate It

Understand gross, contribution and net margin, then model the costs that actually determine whether an ecommerce sale creates profit.

Written by Rashid Ghauri · Founder, EcomlyProfit
Last reviewed September 10, 2026

Profit margin is not one universal number. The useful version depends on the decision you are making. Gross margin helps you understand product economics before many selling costs. Contribution margin shows what remains after the variable costs required to generate and fulfill an order. Net margin goes further and includes operating expenses such as payroll, software, rent and professional services.

Three margins sellers should separate

  • Gross margin: revenue minus product cost, expressed as a percentage of revenue.
  • Contribution margin: retained revenue minus the variable costs associated with the order. This is often the most useful SKU-level planning measure.
  • Net margin: company-level profit after variable costs and operating expenses. It answers a different question from SKU contribution.

Contribution-margin formula

Contribution Margin % = (Retained Revenue − Variable Costs) ÷ Retained Revenue × 100

Define retained revenue consistently. If a refund, discount or seller-funded promotion reduces what you keep, reflect that in the model. Then include the variable costs that actually change with the sale.

Worked ecommerce example

Suppose an item sells for $60. After a $5 seller-funded discount, retained revenue is $55. Product and inbound cost is $18, marketplace/payment fees are $7, fulfillment and seller-paid shipping total $8, packaging is $1, and expected returns/refunds are modeled at $2 per order. Variable costs are therefore $36.

Contribution profit = $55 − $36 = $19
Contribution margin = $19 ÷ $55 × 100 = 34.5%

This does not mean the company earns 34.5% net profit. Advertising, payroll, software, rent, taxes and other operating expenses may still need to be paid. The example is useful because it makes the boundary between order economics and company economics explicit.

Costs that are commonly omitted

  • Marketplace referral, transaction or payment-processing fees.
  • Fulfillment, pick-and-pack, storage and seller-paid outbound shipping.
  • Inbound freight, duties and handling when they are not already included in product cost.
  • Packaging, inserts and other per-order materials.
  • Expected refunds, returns, replacements and non-recoverable fees.
  • Affiliate or creator commission and performance advertising.

Margin and advertising are connected

Contribution before advertising determines how much acquisition cost the order can support. If an order contributes $19 before advertising, spending more than $19 to acquire that order would push modeled contribution below zero before overhead. That is why margin should be read together with break-even ROAS or break-even CPA rather than in isolation.

There is no universal “good” ecommerce margin

A healthy margin for one business can be inadequate for another. Return rates, repeat purchase behavior, inventory risk, advertising intensity, fulfillment model and overhead all matter. Use your own economics and compare scenarios instead of relying on a single internet benchmark.

How to improve a weak margin

Test the levers separately: price, supplier cost, packaging, shipping, fulfillment method, marketplace mix, discount depth and acquisition cost. Changing one assumption at a time makes it clear which lever actually improves the result. A higher selling price is not automatically the best answer if it materially reduces conversion.

Common calculation mistakes

  • Using selling price as revenue even when discounts or refunds reduce retained revenue.
  • Counting freight or duties twice by including them in both landed cost and a separate expense line.
  • Ignoring fixed costs completely, or forcing every fixed cost into a per-order calculation without a transparent allocation.
  • Treating marketplace fees as permanent global percentages when rates vary by country, category, plan or program.
  • Calling contribution margin “net profit” even though overhead has not been deducted.

A practical SKU workflow

Start with one SKU and one channel. Enter the actual selling price, discounts, product/landed cost, selling fees, fulfillment, shipping, return allowance and acquisition cost. Save a base case, then test a discount case and a higher-ad-cost case. If the economics remain acceptable across realistic scenarios, the decision is more robust than a single best-case calculation.

Use Ecomly Profit as a planning model

Ecomly Profit is designed for scenario analysis, not accounting or tax reporting. Marketplace terms change and individual seller arrangements differ, so verify current official fees and use your own records for commercial decisions.

Open Profit Margin Calculator Global Profit Calculator

Editorial note

Fee schedules and seller programs can change. Verify current official marketplace terms for your country, category and account before making a commercial decision. Ecomly Profit provides planning estimates and educational guidance, not accounting, tax, legal or investment advice.