All posts
Profit

Profit Margin Calculator Guide for Ecommerce: Margin vs Markup, Profit per Order and What a Discount Leaves (2026)

How to calculate margin and markup, the difference between gross, contribution and net margin, what each order keeps after VAT, shipping, fees and returns, and what a Black Friday discount does to it.

+ +

"We have a 50% margin" gets said a lot in ecommerce, and it rarely means the same thing twice. Sometimes it's a 50% markup, which is a 33% margin. Sometimes it's gross margin before shipping, payment fees and returns. It almost never means what an order leaves once everything it costs to deliver has been paid.

The difference is largest when you discount. A product with a 50% gross margin keeps 38.8% of its net revenue after shipping and fees; at 30% off that drops to 13.6%, and at 40% off the order loses money before you've spent anything on ads.

This guide covers margin vs markup, the three levels of margin and when to use each, a worked example of profit per order, how to price for a target margin, and what Black Friday discounts leave.

Admetrics is a marketing measurement and budget platform for ecommerce and DTC brands. We work out the profit left on every order after costs and returns, by product, channel and campaign.

Key takeaways

  • Margin divides profit by price; markup divides it by cost. A 100% markup is a 50% margin.
  • Use gross margin for pricing, contribution margin for marketing decisions and net margin for the business as a whole.
  • Take VAT out of the price before you calculate any margin.
  • Shipping and payment fees come off every order. In our example they turn a 50% gross margin into 38.8%.
  • To price from cost, use price = cost ÷ (1 − target margin). A €40 product at a 50% target margin needs an €80 net price.
  • Discounts cut margin much faster than they cut price. At 30% off our example keeps 13.6% after shipping and fees, and at 40% off it loses money.

Margin vs markup

Margin and markup measure the same profit against different bases: margin against the selling price, markup against the cost.

Margin = (net price − cost) ÷ net price

Markup = (net price − cost) ÷ cost

A product that costs €40 and sells for €80 net makes €40 of profit, which is a 50% margin and a 100% markup.

Chart of markup against the margin it gives, from 25% markup (20% margin) to 200% markup (66.7% margin)
Markup and the margin it gives: 25% markup = 20% margin, 50% = 33.3%, 100% = 50%, 150% = 60%, 200% = 66.7%
MarkupMarginPrice for a €40 cost
25%20.0%€50.00
50%33.3%€60.00
100%50.0%€80.00
150%60.0%€100.00
200%66.7%€120.00

To convert between them, margin = markup ÷ (1 + markup) and markup = margin ÷ (1 − margin). Margin can never reach 100%, while markup has no ceiling.

Discounts are easier to reason about in margin, because a discount comes off the price and the price is what margin is measured against. On a product with a 50% margin, a 30% discount removes 60% of the gross profit.

Gross, contribution and net margin

MarginWhat it subtracts from net revenueUse it for
Gross marginProduct cost (COGS), including inbound freight and dutiesPricing and product range decisions
Contribution margin (CM2)Also fulfilment, shipping, payment fees and returnsOffers, discounts and how much you can pay for an order
Contribution margin after marketing (CM3)Also ad spend and other marketing per orderWhether campaigns and channels earn
Net marginAlso fixed costs: team, rent, software, interest, taxThe health of the business as a whole

For marketing decisions, use contribution margin: it is what each extra order adds to the business. Our contribution margin guide covers CM1 to CM3 in detail.

Profit per order, after every cost

Here is the same product, followed through every cost an order carries:

LinePer orderShare of net revenue
Price paid, incl. 19% VAT€95.20
VAT−€15.20
Net revenue€80.00100%
Product cost−€40.00
Gross profit€40.0050.0%
Fulfilment and shipping−€7.00
Payment fees (2.5%)−€2.00
Expected returns (10% × €12)−€1.20
Contribution margin (CM2)€29.8037.3%
Ad spend per order−€15.00
Left after marketing (CM3)€14.8018.5%

Shipping and fees take the margin from 50% to 38.8%, and expected returns take it to 37.3%. Once the order is advertised as well, the "50% margin" product keeps €14.80, or 18.5% of net revenue, and that €14.80 has to cover fixed costs before any of it is profit.

The VAT trap

Work out the margin on the VAT-inclusive price and the same product seems to have a 58% margin: (€95.20 − €40) ÷ €95.20. You collect VAT for the tax office, so take it out first.

Pricing for a target margin

For a target gross margin

Net price = product cost ÷ (1 − target margin)

A €40 product with a 50% target margin needs an €80 net price, or €95.20 including 19% VAT.

For a target margin after order costs

Net price = (product cost + shipping per order) ÷ (1 − target margin − payment fee %)

This version builds in the costs every order carries, so the margin you aim for is the margin you keep once the order ships:

Target margin after shipping and feesNet pricePrice incl. 19% VAT
30%€69.63€82.86
35%€75.20€89.49
40%€81.74€97.27
45%€89.52€106.53

Same product: €40 product cost, €7 shipping, 2.5% payment fees.

If you plan to discount for Black Friday, set the price so the discounted order still earns the margin you need. The next section shows how fast that margin goes.

Profit margin in Black Week

A discount comes off the price, while the product cost, the shipping label and most of the payment fee stay where they were. Margin therefore falls much faster than price.

Chart of gross margin and margin after shipping and fees at full price, 20%, 30% and 40% off
Gross margin and margin after shipping and fees by discount: 50% and 38.8% at full price, 37.5% and 24.1% at 20% off, 28.6% and 13.6% at 30% off, 16.7% and a loss at 40% off
PriceNet priceGross profitGross marginLeft after shipping and feesMargin after order costs
Full price€80.00€40.0050.0%€31.0038.8%
20% off€64.00€24.0037.5%€15.4024.1%
30% off€56.00€16.0028.6%€7.6013.6%
40% off€48.00€8.0016.7%−€0.20Loss

For every product you plan to discount, check three things:

  1. What the order leaves after order costs at the discount price. If that is less than you pay per order in ads, every sale loses money.
  2. How many more orders the discount needs. At a 50% gross margin, 30% off needs 150% more orders to earn the same gross profit; the discount section of our contribution margin guide shows the full table.
  3. Whether a spend threshold, bundle or gift would do the job instead. These cost margin only when the basket grows, or cost a fixed amount; see our AOV guide.

Common mistakes

  • Treating markup as margin. A 50% markup is a 33% margin, so pricing as if it were 50% overstates profit by half.
  • Calculating margin on the price including VAT, which makes a 50% margin look like 58%.
  • Stopping at gross margin. Shipping, fees and returns come off every order; in our example they take about 13 points.
  • Using one margin for every product. Bestsellers, bundles and clearance items differ, so check the margin on the products you promote.
  • Planning discounts from full-price margins. Recalculate at the discount and compare the result with your ad cost per order.

Profit margin calculator

Screenshot of the Admetrics profit margin calculator
Profit margin calculator

Try it with your own numbers: the free profit margin calculator shows your margin and markup. For what's left after shipping, fees, returns and ads, use the contribution margin calculator; for a discount, the discount profit calculator.

FAQ

How do you calculate profit margin?

Subtract product cost from the net price (excluding VAT) and divide by the net price. A product that costs €40 and sells for €80 net has a 50% margin.

What is the difference between margin and markup?

Margin divides profit by the price; markup divides it by the cost. A 100% markup is a 50% margin.

How do you convert markup to margin?

Margin = markup ÷ (1 + markup). A 50% markup is 0.5 ÷ 1.5 = 33.3% margin.

What is a good profit margin for ecommerce?

Check that your margin after shipping, fees and returns is higher than what you pay per order in ads. Benchmarks vary a lot by category and by which margin is being quoted, so they are a weaker guide than that check.

Should I calculate margin with or without VAT?

Without. VAT is collected for the tax office, so margin is calculated on the net price.

How does a discount change my margin?

A discount lowers the price while costs stay the same, so margin falls faster than price. In our example, 30% off cuts the margin after shipping and fees from 38.8% to 13.6%.

See margin on every order, automatically

Admetrics calculates gross margin and contribution margin for every order, product, channel and campaign, with shipping, fees and returns included. During Black Week you can see which discounts still earn while there is time to change them.

Run your biggest week free: Admetrics is free until 1 December, with no credit card or commitment. Get started for free

All posts
+ +

More from the blog.

+ +

Turn budgetsinto profit.

One hour setup. 21 days free. Cancel any time.