Ecommerce Profit Margin Calculator

Gross profit margin divides net profit per order by selling price. Selling a product for $50 with $35 in total unit costs ($20 COGS + $5 shipping + $10 ads) leaves $15 profit and a 30% margin.

Profit margin30%
Net profit / unit$15.00
Markup on cost42.86%

Margin vs. markup comparison ($35 total cost)

Selling PriceProfitMargin (% of Price)Markup (% of Cost)
$45.00$10.0022.22%28.57%
$50.00$15.0030.00%42.86%
$70.00$35.0050.00%100.00%

Formula and worked example

Margin (%) = ((Selling Price − Total Unit Costs) ÷ Selling Price) × 100

At a $50.00 selling price with $20.00 product cost, $5.00 shipping, and $10.00 customer acquisition cost ($35.00 total cost): Net Profit = $15.00, Profit Margin = ($15 ÷ $50) × 100 = 30%, and Markup = ($15 ÷ $35) × 100 = 42.86%.

How to use this calculator

  1. Enter landed product cost (COGS) and your retail selling price.
  2. Add average fulfillment/shipping cost and ad acquisition cost per order.
  3. Compare net profit, margin percentage, and markup percentage.

Limitations and assumptions

This unit-level formula excludes fixed overhead (software subscriptions, warehouse rent), refunds/chargebacks, and payment gateway fees (~2.9% + $0.30) unless added directly into your unit cost inputs.

Frequently asked questions

What is the difference between profit margin and markup?

Profit margin divides profit by the selling price, while markup divides profit by the cost. Margin is always smaller than markup on a profitable item.

How can I include payment processing fees?

Add your gateway fee (for example, 3% of the selling price plus fixed transaction fee) to the shipping or product cost field.

Written by Free Calculator Editorial TeamLast reviewed 2026-12-05Sources: SBA Break-Even & Pricing Guide