Margin Calculator
Calculate margin, markup and gross profit from cost and selling price, or work backward from a target margin or markup to find the price you need.
Gross margin
33.33%
- Gross profit
- $50.00
- Markup
- 50%
- Cost share
- 66.67%
Calculation
(selling price − cost) ÷ selling price × 100
How to use the margin calculator
Choose Margin when you already know the cost and selling price. Choose Target margin when you know the margin you want to keep. Choose Target markup when you want to add a percentage to cost.
Keep the two money figures on the same basis. If cost is for one item, use the selling price for one item. If cost covers an order or batch, use the selling price for that same order or batch.
| Mode | Enter | What you get |
|---|---|---|
| Margin | Cost and selling price | Gross margin, gross profit, markup, and cost share |
| Target margin | Cost and desired margin | Selling price, gross profit, markup, and cost share |
| Target markup | Cost and desired markup | Selling price, gross profit, margin, and cost share |
Margin and markup are not the same percentage
Margin measures gross profit against the selling price. Markup measures the same gross profit against cost. The dollars do not change; only the denominator does.
If something costs $100 and sells for $150, gross profit is $50. The margin is 33.33% because $50 is one-third of the selling price. The markup is 50% because $50 is half of the cost.
That difference matters when setting prices. A 50% markup does not create a 50% margin. A 50% margin on a positive cost requires a 100% markup.
| Margin | Equivalent markup |
|---|---|
| 10% | 11.11% |
| 20% | 25% |
| 25% | 33.33% |
| 30% | 42.86% |
| 33.33% | 50% |
| 40% | 66.67% |
| 50% | 100% |
How to set a selling price from a target margin
A target margin starts with the final selling price. If the target margin is 40%, the cost must fit inside the remaining 60% of the price.
For example, a $60 cost at a 40% target margin requires a $100 selling price. A $60 cost with a 40% markup would produce only an $84 price, so using markup when you mean margin can leave the price well below the intended target.
When the calculated price has more decimals than your currency normally uses, round to a practical price and check that rounded amount in Margin mode. Even a small rounding change can move the final percentage.
What should count as cost?
Use the cost that belongs to the same sale you are measuring. For a product, that may be its purchase or production cost. For a service, it may be the direct cost of delivering the work.
For accounting gross margin, businesses normally compare net sales with cost of goods sold. What belongs in cost of goods sold can vary with the business and its accounting treatment, so use the figures your records treat consistently.
A payment fee, marketplace commission, delivery charge, advertising cost, or other expense does not automatically belong in gross margin. If you want to measure profitability after those variable costs, you are moving toward contribution margin rather than the simpler gross-margin calculation used here.
A discount can cut profit much faster than price
Suppose an item costs $60 and normally sells for $100. It earns $40 of gross profit at a 40% margin.
A 20% discount lowers the price to $80, but the $60 cost does not move. Gross profit falls to $20 and margin falls to 25%. The selling price dropped by one-fifth; the gross profit was cut in half.
Cost increases work in the other direction. If the same item's cost rises 10% to $66 while its price stays at $100, gross profit falls to $34 and margin falls to 34%. This is why a stable sticker price does not necessarily mean a stable margin.
| Scenario | Cost | Selling price | Gross profit | Margin |
|---|---|---|---|---|
| Normal sale | $60 | $100 | $40 | 40% |
| 20% price discount | $60 | $80 | $20 | 25% |
| 10% higher cost | $66 | $100 | $34 | 34% |
Gross margin is not net margin
Gross margin looks at revenue after the direct cost or cost of goods sold used in the calculation. It does not tell you what the business ultimately keeps after payroll, rent, software, advertising, interest, taxes, and other operating costs.
It is possible for a product to have a healthy gross margin while the business as a whole loses money. Gross margin is most useful for understanding the economics of the sale before the rest of the business cost structure is applied.
Use margin as a signal, not a price rule
A target margin can tell you the price required by the math, but it cannot tell you whether customers will pay it. Demand, competitors, positioning, discounts, channel fees, and the rest of the cost structure still matter.
The useful habit is to check the percentage from both directions: work forward from an actual selling price to see the margin you are earning, and work backward from a target margin to see the price that target would require.
Formulas
Margin and markup describe the same gross profit from two different reference points.
- Cost for the item, service, order, or quantity being priced
- Selling price for the same item, service, order, or quantity
- Gross profit
- Gross margin percentage
- Markup percentage
Examples
Check the margin on an existing price
Cost $100; selling price $150.
Gross profit $50; margin 33.33%; markup 50%.
Price for a 40% target margin
Cost $60; target margin 40%.
Selling price $100; gross profit $40; equivalent markup 66.67%.
Price from a 35% markup
Cost $200; target markup 35%.
Selling price $270; gross profit $70; margin about 25.93%.
See the effect of a discount
Cost $60; original price $100; discounted price $80.
Margin falls from 40% to 25%, while gross profit falls from $40 to $20.
Check a break-even price
Cost $80; selling price $80.
Gross profit $0; margin 0%; markup 0%.
Frequently Asked Questions
What is profit margin?
Profit margin is profit expressed as a percentage of revenue. This calculator uses gross margin: gross profit divided by selling price, multiplied by 100.
What is the difference between margin and markup?
Margin divides gross profit by selling price. Markup divides the same gross profit by cost. Because they use different denominators, the percentages are different.
Is a 50% markup the same as a 50% margin?
No. A 50% markup produces a 33.33% margin. A 50% margin on a positive cost requires a 100% markup.
How do I calculate selling price from a target margin?
Divide cost by one minus the target margin written as a decimal. A $60 cost at a 40% target margin requires a $100 selling price.
How do I calculate selling price from markup?
Multiply cost by one plus the markup written as a decimal. A $200 cost with a 35% markup produces a $270 selling price.
What cost should I enter?
Use the cost that belongs to the same item, service, order, or quantity as the selling price. For accounting gross margin, use the cost figure your business consistently treats as cost of goods sold.
What is a good profit margin?
There is no single good margin for every business. A useful target depends on the industry, product mix, channel, cost structure, pricing power, and the expenses that still have to be paid after gross profit.
Why does a discount reduce margin so quickly?
A discount lowers the selling price while the underlying cost may stay the same. That means the discount comes directly out of gross profit unless the cost falls too.
Can margin be negative?
Yes. If selling price is below cost, gross profit is negative and gross margin is negative as long as the selling price is above zero.
Does gross margin include overhead, advertising, shipping, or payment fees?
Not automatically. This calculator subtracts the cost you enter. Costs outside that figure are not included, so the result should not be confused with operating margin, contribution margin, or net margin.