Ecommerce Cost Profit Equation Explained
Use this ecom profit formula framework to test pricing, fee, shipping, and ad scenarios before scaling spend.
Net Profit
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.
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
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.
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 calculator