How to calculate profit margin for an ecommerce product
Profit margin is the percentage of each sale you actually keep after costs. To calculate it, subtract all of your per-sale costs from your selling price, then divide the result by the selling price:
Net profit margin = (Selling price - All costs) / Selling price x 100
The mistake most stores make is stopping at product cost. Your cost of goods sold (COGS) is only the start - shipping, payment processing fees, advertising, and packaging all come out of the same sale. A product that looks like it has a 60% margin on paper often nets closer to 30% once everything is counted.
Here's a worked example using the calculator's defaults. Say you sell a product for $100. The product costs you $40, shipping costs $8, you spend $15 on ads to win the sale, and your payment processor takes 2.9% + 30 cents ($3.20). Your true cost per sale is $66.20, leaving $33.80 of net profit - a 33.8% net margin, not the 60% the COGS alone would suggest.
Gross profit vs. net profit - what's the difference?
Gross profit is your revenue minus the cost of the product itself: in the example above, $100 - $40 = $60, a 60% gross margin. It tells you whether the product is fundamentally viable, but not whether you're making money.
Net profit is what's left after every per-sale cost - COGS, shipping, payment fees, advertising, and anything else you spend to fulfil an order. It's the number that actually lands in your bank account, and it's the one this calculator is built around. If you only ever track gross margin, scaling ad spend can quietly turn a profitable-looking product into a loss-maker.
What is a good profit margin for ecommerce?
There's no single answer, but as a rule of thumb: a net margin above 20% is healthy, 10-20% is workable but leaves little room for rising ad costs or returns, and anything under 10% is fragile - a small CPA increase or a shipping price rise can wipe it out. Many successful stores operate between 10% and 30% net, with gross margins of 50% or more giving them the headroom to spend on acquisition.
The more useful question is whether your margin can absorb change. That's why this calculator shows the effect of product cost, shipping, payment fees, advertising, and custom costs together, so you can see how quickly a profitable product can change.
Why payment fees matter more than you think
Payment processing fees are usually a percentage plus a fixed amount - Stripe and Shopify Payments charge 2.9% + 30 cents on a standard US plan, PayPal 3.49% + 49 cents. On a $100 order that's $3.20 to $3.98, which sounds small until you realise it's 10% or more of a typical net profit. This calculator computes the exact fee from your selling price, or your own custom rate if you've negotiated one, so the fee is never a guess.