Seller guide

How to calculate ecommerce profit margin

Ecommerce profit margin is not just selling price minus product cost. Real margin includes fees, shipping, packaging, returns, ads, and overhead allocation.

Last reviewed: 2026-06-06. This guide is educational and is not tax, legal, financial, accounting, or business advice.

The basic formula

Net profit margin is estimated profit divided by gross order revenue. For a seller, gross order revenue usually includes item revenue plus buyer-paid shipping, minus discounts. Estimated profit is what remains after subtracting product cost, fulfillment cost, platform fees, payment fees, returns, ads, and any fixed-cost allocation.

A practical ecommerce formula is: estimated profit = gross order revenue - product cost - shipping cost - packaging - payment fees - platform fees - returns allowance - ad cost - other variable costs - allocated fixed costs.

Step 1: Start with order revenue

Start with the amount the order brings in before pass-through taxes. If the buyer pays shipping to you, include it as revenue. If you offer a discount, subtract it. If sales tax is collected as a pass-through, keep it separate unless a payment processor charges a fee on that tax amount.

Step 2: Subtract product and fulfillment cost

Product cost should include the real cost to put the product in your hands: materials, wholesale cost, manufacturing, inbound freight, customs, or landed cost when relevant. Fulfillment cost should include seller-paid shipping, packaging, inserts, labels, and handling costs you actually absorb.

Step 3: Add platform and payment fees

Most sellers have at least one percentage fee and one fixed payment fee. Fixed transaction fees matter more on low-ticket orders because the same fixed amount consumes a larger share of revenue. For platform-specific fees, use the dedicated calculators and source ledger rather than assuming one generic fee stack.

Step 4: Include returns and ads

Returns and refunds are often irregular, but ignoring them makes margin look healthier than it is. A return allowance can be a fixed amount per order or a percentage of revenue. Ads should be included as average acquisition cost per order when you are evaluating paid traffic.

Step 5: Allocate fixed costs carefully

Monthly apps, subscriptions, tools, rent, and software can be allocated across expected monthly orders. This is not perfect accounting, but it helps prevent a product from looking profitable while the store loses money after overhead.

Common mistakes

  • Using markup when you meant margin.
  • Forgetting buyer-paid shipping is revenue and seller-paid shipping is cost.
  • Ignoring fixed payment fees on lower-priced products.
  • Leaving out returns, ad cost, packaging, and monthly app costs.
  • Using platform averages instead of checking the actual fee rules for the selling channel.

Use the calculator

Use the Ecommerce Profit Margin Calculator to estimate profit, margin, markup, break-even item price, and target-margin item price with editable assumptions.