ToolNest

Profit Margin Calculator for Ecommerce

The margin that kills ecommerce businesses is the one they never calculate. Product cost against selling price gives a comfortable-looking 60%, and then payment processing takes 3%, shipping takes 12%, a fifth of apparel orders come back, and paid acquisition takes a quarter of revenue. What looked like 60% is 8%, and it turns negative the moment ad costs rise.

Use the calculator for your product-level gross margin, then work down the stack below. The number you need for decisions is contribution margin after variable costs and acquisition — because that is what actually funds your overheads and tells you whether spending more on ads makes you richer or poorer.

Direct cost only — materials, goods, delivery.

Add volume to see total profit rather than per-unit.

Gross profit margin

63.27%

$31.00 profit on each unit sold.

Profit per unit
$31.00
Selling price
$49.00
Equivalent markup
172.22%

Markup divides profit by cost, so it always reads higher than margin.

Total profit on 500 units
$15,500.00
Total revenue
$24,500.00

This is gross margin — it excludes rent, salaries, marketing and tax. A healthy gross margin can still leave a net loss if overheads are high.

Starting values are set for a typical ecommerce scenario — change any field to match yours. Need the plain version? Profit Margin Calculator.

Work down the stack, not just product cost

Each layer below is a real cost of selling one unit online. Gross margin only accounts for the first. The example follows a $49 product costing $18.

Margin stack on a $49 order
LayerTypical costRunning margin
Selling price$49.00
Product cost (COGS)$18.0063% gross
Payment processing (2.9% + $0.30)$1.7259%
Shipping and packaging$6.0047%
Returns allowance (8% of orders)$2.4042%
Customer acquisition cost$12.0018% contribution
Contribution margin, not gross margin, is what pays for your salary, software, warehouse and profit. At 18% you have $8.88 per order to cover all of it.

Return rates vary enormously by category

Returns are the cost most new sellers underestimate, and the variation between categories is wide enough that a single allowance figure is useless. Build the rate for your own category into your pricing rather than treating returns as an exception.

  • Apparel and footwear see the highest rates, frequently 20% to 30% online, driven by fit and size uncertainty.
  • Consumer electronics run lower but each return is expensive, often requiring testing and repackaging.
  • Consumables, beauty and pet products typically see single-digit rates.
  • A return costs more than the lost sale: return shipping, inspection, repackaging, and often a markdown or a write-off if the item cannot be resold as new.
  • Reducing returns is usually a better lever than pricing for them. Better size guides, more photos, video and detailed dimensions all pay for themselves quickly in high-return categories.

The ratio that decides whether you can scale

Once contribution margin is known, the scaling question becomes arithmetic. If a customer contributes $8.88 on their first order and you spend $12 to acquire them, that order loses money — the business only works if they buy again.

This is why repeat purchase rate matters more than any single-order margin. A category with genuine repeat behaviour can profitably pay more than first-order margin to acquire a customer; one without it cannot, no matter how good the creative is.

  • Calculate contribution margin per order first, then compare it to your blended acquisition cost.
  • If first-order contribution is below CAC, you are buying customers on credit against future orders — know your repeat rate before scaling spend.
  • Watch contribution margin, not ROAS. ROAS can look fine while shipping and returns quietly eat the difference.
  • Free shipping is a price cut, not a marketing tactic. If you offer it, put the cost in the margin stack rather than treating it as promotional.
  • Rising ad costs compress contribution margin directly. A business at 18% contribution has far less room to absorb a CAC increase than one at 35%.

Frequently asked questions

What is a good profit margin for an ecommerce business?
Gross margins of 40% to 60% are common, but net margins are usually far thinner — often 5% to 15% once fees, shipping, returns and acquisition are counted. What matters is contribution margin after all variable costs including ads. Below roughly 20% contribution, scaling gets fragile because a small rise in ad costs wipes out the profit.
Should shipping be counted in cost of goods?
Outbound shipping is a variable cost of fulfilling an order, so include it when calculating the margin you use for decisions, whether or not your accountant classifies it as COGS. Excluding it makes every order look more profitable than it is, and it is often the second-largest variable cost after the product.
How do I account for returns in my margin?
Apply your category's return rate as a percentage allowance against each sale, and include the full cost — return shipping, inspection, repackaging, and any markdown or write-off. In apparel, where rates can exceed 25%, this single adjustment often changes the pricing decision entirely.
What is contribution margin and why does it matter more than gross margin?
Contribution margin is what remains after every variable cost of getting one order out of the door, including acquisition. It matters more because it is what actually funds your fixed costs and profit. Two businesses with identical 60% gross margins can have 35% and 5% contribution margins depending on shipping, returns and CAC.
How do marketplace fees change the calculation?
Substantially. Marketplace commissions of 8% to 15%, plus fulfilment and storage fees where applicable, replace some of your acquisition cost but come off the top of every sale. Model each channel separately — the same product often needs a different price on a marketplace than on your own store to reach the same contribution.