ToolNest logoToolNest.

How to Calculate Ecommerce Profit Margin

How to calculate ecommerce profit margin: subtract every per-order cost from the selling price, then divide by the price — net margin = (price − COGS − shipping − gateway fee − ad cost − return loss − other fees) ÷ price. On a $49 order with $12 COGS, $5.50 shipping, a 2.9% + $0.30 gateway fee, $8 ad cost and 5% returns, you keep $19.42 — a 39.6% true net margin, not the 75.5% gross margin the price and cost alone suggest. Run your product through our free ecommerce profit margin calculator to see every line and the price that hits your target margin.

The Formula, Line by Line

Start with the selling price per order, then subtract in order: COGS (landed unit cost — product plus inbound freight), outbound shipping you pay (0 if the customer pays it), the gateway fee (price × percentage + fixed fee — on $49 at 2.9% + $0.30 that is $1.72), ad cost per order (what one bought order costs in ads), expected return loss, and other per-order fees (platform slices, packaging, app costs spread per order). The return line is the one most margin math skips: expected return loss = return rate × (refunded price + shipping + handling + gateway fee kept − COGS if restocked). On the defaults, one return costs $47.22 and at a 5% return rate the expected loss is $2.36 per order. Net profit is then $49 − $12 − $5.50 − $1.72 − $8.00 − $2.36 = $19.42, and net margin is $19.42 ÷ $49 = 39.6%.

Gross Margin vs Net Margin: The 36-Point Gap

Gross margin on the defaults is ($49 − $12) ÷ $49 = 75.5% — a number that looks like a thriving business. Net margin is 39.6%, and the 36-point gap between them is shipping, fees, ads and returns: the entire operating reality of selling online. Pricing on gross margin alone is the most common reason a store with healthy-looking products runs out of cash, because every cost after COGS is treated as an afterthought instead of a line item. The discipline is simple: never quote a margin without saying which one, and never set a price from gross margin when net margin is the number that pays rent. Our ecommerce profit margin calculator shows both side by side so the gap is visible on your own numbers, not just in an example.

Returns: The Line That Decides Fashion Margins

Apparel-tight stores sit near a 5% return rate; fashion runs 15–30%, and at those rates the return line stops being a rounding error. The same $49 product at a 20% return rate with $4 handling on PayPal Checkout keeps $11.56 per order (23.6% margin) instead of $19.42 — a $7.86 swing from two input changes. Two toggles decide whether the return line is honest: is the returned product restocked and resold (COGS recovered), and does the gateway refund its fee on a return (most do not)? Perishable, used or non-resellable stock makes every return a full loss; a gateway that keeps its fee adds $1.72 to every return on the defaults. If you do not know your return rate, start with your category's typical range and refine it from your last quarter of orders.

Category Targets and the Target-Margin Price

A common healthy floor is 20% net margin; 10–20% is workable and under 10% leaves almost no room for overhead, refund spikes or ad-cost inflation. Category targets run higher where returns bite: apparel and footwear 35%+, home goods and hard goods 30%+, beauty and consumables 40%+, electronics and accessories 25%+. The practical move is to price backwards from the target: the ecommerce profit margin calculator's target-price solver computes the price that delivers your target margin at your cost structure — $35.63 for a 20% margin on the defaults, which are already above target at $49. When your current price delivers less than your target, the solver tells you exactly how much to raise the price or cut costs; when it delivers more, it tells you how much discount headroom you have before a promotion breaks the floor.

Pricing Decisions the Calculator Settles

Three decisions become arithmetic instead of argument. First, launch pricing: a product that keeps $19.42 per order at a 39.6% margin can absorb an introductory discount of about $10 before approaching a 20% floor. Second, assortment: compare products by net profit per order, not revenue — a $29 product with $9 COGS, $3.50 shipping, 10% returns and $6 ad cost keeps only $6.59 (22.7%) against the $49 product's $19.42, so the same ad budget buys nearly three times the profit on the higher-price product. Third, repricing triggers: if ad cost rises from $8 to $15, net falls to $12.42 (25.3%) — still above a 20% floor, so the business absorbs the increase without repricing, and the solver confirms the 20% price is $45.36, still below $49. Margin math does not make the decision for you, but it stops the meeting from debating feelings.

Do it in one click

Calculate your true net margin after fees, ads and returns — and the price that hits your target margin — free, no signup.

Open the Free Tool →