Analify AI
Free ecommerce calculators · Profit and pricing

Margin and markup calculator

Margin and markup use the same two numbers and give different answers. Enter your cost and price to see both, plus the price you need to hit a target margin.

Example numbers. Replace them with yours.

USD
USD
%
Margin
60%
Profit per unit
USD 36
Markup
150%
Price for your target margin
USD 48
Max cost at your target margin
USD 30

What it calculates

Margin is the share of the selling price you keep after product cost. Markup is how much you add on top of cost. A product that costs 40 and sells for 100 has a 60% margin and a 150% markup. Mixing them up is one of the most common pricing mistakes: pricing at a 50% markup gives you a 33% margin, not 50%.

How to read the result

Use margin when you talk about profit and ad budgets: break-even ROAS is 1 ÷ margin. Use markup when you set prices from cost, but check the margin it gives you. This margin covers product cost only. Shipping, fees and ads come out of it next, so use the contribution margin calculator before setting an ad budget.

Learn the metric:Gross margin

The formula

Margin = (Price − Cost) ÷ Price
Markup = (Price − Cost) ÷ Cost
Price for a target margin = Cost ÷ (1 − margin)
Max cost at a target margin = Price × (1 − margin)

Worked example

Example inputs

Product cost
USD 24
Selling price
USD 60
Target margin
50%

Results

Margin
60%
Profit per unit
USD 36
Markup
150%
Price for your target margin
USD 48
Max cost at your target margin
USD 30

What changes the result

Selling price at five values. Every other input stays as in the worked example; the highlighted row is the example.

Selling priceMarginProfit per unit
USD 3020%USD 6
USD 4546.7%USD 21
USD 6060%USD 36
USD 7568%USD 51
USD 9073.3%USD 66

Use your real numbers

Analify reads selling prices and product costs (COGS) from Shopify and shows margin per product, next to what ads, shipping and returns take from it.

Analify already reads 2 of these 3 inputs live, from Shopify

Start free

Questions

What is the difference between margin and markup?

Margin divides profit by the selling price. Markup divides profit by the cost. The same product always has a higher markup than margin, so a 100% markup is a 50% margin.

How do I convert markup to margin?

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

What margin do I need to run ads?

Your margin sets your break-even ROAS: 1 ÷ margin. At a 40% margin you need 2.5× ROAS just to cover product cost, before shipping, fees and returns.

Do you store what I enter?

No. The calculation runs in your browser and nothing is sent to Analify.

Give AI the business it was missing.

Connect your company, build its memory and start asking, deciding and approving from one place.

Works with any AI you useActs only when you approve

See pricing