Margin Calculator

Margin = (price - cost) ÷ price. Enter a cost and price for your profit margin and markup, or a target margin for the price, with discounts and fees.

  • Free
  • No sign-up
  • Instant results

Your numbers

What you know

What one unit costs you: buying or making it, and getting it to you.

For the profit on that many sales.

A sale or a code taken off the price.

Fee on each sale (optional)
Gross margin42.9%$15 kept from a $35 price
Profit per unit$15
Markup75%Profit as a share of the cost
Profit on 100 units$1,500Revenue $3,500

Margin = (price - cost) ÷ price. Markup = (price - cost) ÷ cost.

A 30% markup is not a 30% margin

Adding 30% to a $20 cost gives $26, and that price keeps only 23.1% of each sale. A 30% margin needs $28.57: divide the cost by (1 - 30%), do not multiply it by (1 + 30%). Markup divides the profit by the cost, margin divides it by the price, so the markup is always the bigger number. To set a price from a markup instead, use the markup calculator (set a price from a markup).

Margin to markup

The markup you need for each margin, and the price it gives on your cost. Markup = margin ÷ (1 - margin).

MarginMarkupPrice on your $20 cost
10%11.1%$22.22
15%17.6%$23.53
20%25%$25
25%33.3%$26.67
30%42.9%$28.57
35%53.8%$30.77
40%66.7%$33.33
50%100%$40
60%150%$50
70%233.3%$66.67
75%300%$80
80%400%$100

What discounts and fees take

A discount comes straight out of the profit, not out of the cost. Try a discount above: on a $35 price, 20% off leaves $8 of the $15 profit.

Fees come out of the price the buyer pays. On your own store that is the platform's cut and the card rate: on Clyro Starter (our product), 0.6% a sale plus Stripe's 2.9% + 30¢ in the US, so $1.53 on a $35 sale, leaving a 38.5% margin. Marketplaces take more and price it in several parts: run the sale through the Etsy fee calculator, the eBay fee calculator or the Amazon FBA calculator for each fee, and enter the total as an other fee here.

Rates checked November 27, 2026: Stripe pricing (2.9% + 30¢ for US cards); Clyro Starter $29 a month and 0.6% a sale on clyro.com/pricing.

Set a price from a markup with the markup calculator, work out your profit over a period with the profit calculator, and find how many sales cover your fixed costs with the break-even calculator. To see what the store itself costs, read ecommerce platform fees in 2026 and compare Clyro's plans.

How it works

From cost to margin in three steps

  1. 1

    Enter your cost

    What one unit costs you to buy or make and get to you.

  2. 2

    Add a price or a target margin

    The price you charge, or the share of the price you want to keep.

  3. 3

    Read margin and price

    The margin, profit per unit, markup and profit on your units, or the price to charge.

How to calculate profit margin

Take the selling price, subtract what the product costs you, and divide the result by the price. A $35 product that costs $20 leaves $15, and $15 ÷ $35 = 42.9%: you keep 42.9 cents of every dollar of that sale before your other costs. To go the other way and find the price for a margin you want, divide the cost by 1 minus the margin: a 40% margin on a $20 cost needs $20 ÷ 0.6 = $33.33. A margin is always under 100%, because the profit can never be bigger than the price. Profit on many units is the profit per unit times the units: 100 units at $15 is $1,500.

Margin vs markup: a 30% markup is not a 30% margin

Margin divides the profit by the price; markup divides it by the cost. On a $20 cost sold at $35, the $15 profit is a 42.9% margin and a 75% markup. The classic mistake is to add the margin you want on top of the cost. A 30% markup on $20 gives $26, and $6 ÷ $26 is a 23.1% margin, not 30%. A 30% margin needs $20 ÷ 0.7 = $28.57, a 42.9% markup. To convert, markup = margin ÷ (1 - margin) and margin = markup ÷ (1 + markup): a 50% margin is a 100% markup, a 25% margin is a 33.3% markup. If you price from a markup on cost, the Markup Calculator does it in that direction.

What margin to aim for

There is no single right number: margins differ a lot from one category to the next, and a figure that is healthy for one store can lose money for another. Work out your own target from your costs instead. Add up what each sale costs you beyond the product (payment and platform fees, packaging, shipping you do not charge, ads per sale, returns), then your fixed costs for the month divided by the sales you expect, then the profit you want to keep per sale. Your minimum price is the product cost plus all of that, and your target gross margin is (that price - product cost) ÷ that price. For example, a $20 product with $6 of other costs per sale, $2 of fixed costs per sale and $5 of profit wanted needs a $33 price, a 39.4% gross margin. Then check that price against what similar products sell for.

Gross margin vs net margin

This calculator works out gross margin per product: the price minus the cost of the product itself. Net margin goes further and takes off everything else it takes to run the store, like fees, ads, apps, shipping, staff and rent, as a share of revenue over a period. A product can have a healthy gross margin and the business still make no net profit if those other costs are too high. Use gross margin to price a product, and net margin to see what the store really keeps. The Profit Calculator works out both for a month or a year, and the Break-Even Calculator shows how many sales cover your fixed costs.

How fees and discounts eat margin

A discount comes out of the profit, not out of the cost. On a $35 price with a $20 cost, 20% off brings the price to $28 and the profit from $15 to $8: the margin falls from 42.9% to 28.6%, and you need 87.5% more sales to make the same total profit. Fees on each sale come off the price the buyer pays. On your own store that is the platform's cut and the card rate: on Clyro Starter (our product) 0.6% a sale plus Stripe's 2.9% + 30¢ in the US, $1.53 on a $35 sale, which takes a 42.9% margin to 38.5%, before the $29 monthly plan. Marketplaces take a larger share in several parts; the Etsy, eBay and Amazon FBA calculators break each one down. Rates checked November 27, 2026 on stripe.com/pricing and clyro.com/pricing.

Questions

How do you calculate profit margin?

Profit margin = (price - cost) ÷ price, as a percentage. A product that sells for $35 and costs $20 has a $15 profit and a 42.9% margin. Over a period, use revenue and the cost of the goods sold the same way.

What price do I need for a 30% margin?

Divide the cost by 0.7 (1 minus 30%). On a $20 cost, that is $28.57. In general, price = cost ÷ (1 - margin). Adding 30% to the cost gives $26, which is only a 23.1% margin.

Is a 50% markup the same as a 50% margin?

No. A 50% markup on a $20 cost gives a $30 price and a 33.3% margin. A 50% margin needs a $40 price, which is a 100% markup. Markup divides the profit by the cost, margin divides it by the price, so the markup is always the bigger number.

What is a good profit margin?

It depends on your category and your costs, so there is no single number to aim for. Work it out from your own figures: the margin has to cover your fees, shipping, ads, returns and fixed costs per sale and still leave the profit you want. The section on what margin to aim for shows the formula.

What is the difference between gross margin and net margin?

Gross margin is the price minus the product cost, as a share of the price. Net margin takes off every other cost of running the store too, like fees, ads, apps and staff. This calculator gives gross margin per product; the Profit Calculator gives both for a period.

How does a discount affect my margin?

It comes straight out of the profit. On a $35 product that costs $20, 20% off leaves $8 profit instead of $15, so the margin drops from 42.9% to 28.6% and you need 87.5% more sales to make the same profit. Enter a discount in the calculator to see it on your numbers.

More free tools

All free tools