Ecommerce Cost Profit Equation Explained
This page breaks down the ecom profit formula sellers use for pricing, fee modeling, and ad guardrails. Use it alongside the ecommerce profit calculator when you want numbers without rebuilding spreadsheets.
Core ecommerce cost profit equation
Net Profit = Selling Price - Product Cost - Shipping Cost - Platform Commission - Ad Cost - Other Costs
Example: 50 - 12 - 6 - 5 - 10 - 2 = 15
Gross Profit & Gross Margin
Gross Profit = Selling Price - Product Cost (COGS)
Gross Margin (%) = (Gross Profit / Selling Price) x 100%
Example: Selling price 50 and product cost 20 → gross profit 30 → gross margin 60%.
Net Profit Margin
Net Profit Margin (%) = (Net Profit / Selling Price) x 100%, where Net Profit subtracts shipping, platform or payment fees, optional ad spend, and other costs from selling price after COGS.
Min revenue ROAS (order-level guardrail)
Min revenue ROAS ≈ Selling Price / Contribution Before Ads, where Contribution Before Ads = Selling Price - Product Cost - Shipping - Commission - Other Costs. Compare cautiously to ROAS reported in ad platforms (attribution differs).
Example: Selling price 50, contribution before ads 25 → guardrail ≈ 2.00x revenue per dollar of contribution buffer before ads; use alongside platform metrics.
Formula comparison at a glance
| Metric | Formula | Best for |
|---|---|---|
| Gross margin | (Price − COGS) ÷ Price | SKU pricing and supplier comparison |
| Net profit margin | Net profit ÷ Price | Channel and campaign decisions |
| Contribution before ads | Price − COGS − shipping − fees − other | Free shipping and fee stress tests |
| Break-even ROAS | Price ÷ contribution before ads | Paid traffic guardrails |
Full worked example (step by step)
Assume one order has: price $60, product cost $22, shipping $7, commission 4%, ad cost $12, other costs $2.
- Commission = 60 x 4% = 2.40
- Contribution before ads = 60 - 22 - 7 - 2.4 - 2 = 26.6
- Net profit = 26.6 - 12 = 14.6
- Net margin = 14.6 / 60 = 24.33%
- Min revenue ROAS guardrail = 60 / 26.6 ≈ 2.26x
Second example: thin margin after fees
A marketplace order at $35 with COGS $14, shipping $6, commission 15%, no ads, and $1.50 in return reserve.
- Commission = 35 x 15% = 5.25
- Contribution before ads = 35 - 14 - 6 - 5.25 - 1.5 = 8.25
- Net profit = 8.25 (no ad cost enabled)
- Net margin = 8.25 / 35 = 23.57% — looks healthy until you add $9 ad cost → net profit −0.75
This is why the ecom profit formula must include ad cost when paid traffic is part of the plan. See should ad spend be included in profit.
Common mistakes that distort margin
- Ignoring ad cost when paid traffic is part of your growth model.
- Using gross margin as if it were net margin after fees and shipping.
- Double-counting platform fees by mixing payout and gross-price logic.
- Skipping return reserves and variable transaction costs in other costs.
Ecom profit formula FAQ
What is the ecommerce cost profit equation?
The core equation is: Net Profit = Selling Price − Product Cost − Shipping − Platform Commission − Ad Cost − Other Costs. Each term should map to one cash moment per order so you do not double-count fees or refunds.
What is the ecom profit formula for margin?
Gross margin = (Selling Price − COGS) ÷ Selling Price. Net profit margin = Net Profit ÷ Selling Price after shipping, fees, ads, and other costs. Use gross margin for product pricing and net margin for go-to-market decisions.
How do I calculate break-even ROAS from the formula?
First compute contribution before ads: Selling Price − COGS − Shipping − Commission − Other Costs. Then divide selling price by that contribution. The result is an order-level ROAS guardrail, not a substitute for ad platform attribution.
When should I use gross margin vs net profit margin?
Use gross margin when comparing suppliers, bundles, or SKU pricing. Use net profit margin when deciding whether ads, free shipping, or marketplace fees still leave enough room after fulfillment.
Why formulas matter
Formulas keep your pricing strategy objective. If your margin is too thin, small increases in return rate or ad CPM can erase profit quickly.
Back to ecommerce pricing calculator