Margin Calculator

Find your profit margin, or the price that hits a target margin.

Last updated 2026-11-18 · How we calculate this

Enter the Cost and Price

Currency labels your figures; it does not convert exchange rates.

Calculation
$
What one item costs you. Include shipping or other costs you want the price to cover.
$
The price you charge, before any sales tax.
%
The share of the selling price you want to keep as profit.

Margin Breakdown

Enter a cost to see the margin breakdown.

The calculator uses only the cost and price you enter. It does not add payment fees, shipping, overheads or sales tax unless you include them in the cost, and it cannot tell you what margin suits your business or market.

Quick Answer

Margin is the share of the selling price you keep as profit. An item that costs $12.00 and sells for $20.00 makes $8.00, and $8.00 ÷ $20.00 = 40%. To price for a margin, divide the cost by 1 minus the margin: $18.00 ÷ (1 − 0.40) = $30.00.

How to Use This Calculator

Choose whether you know the selling price and want the margin, or know the margin you want and need a price. Enter what the item costs you, then the price or the target margin. The calculator also shows the profit in money and the markup, so you can see both ways of describing the same sale.

  1. Choose "Find the margin" or "Find the price".
  2. Enter the cost of one item.
  3. Enter the selling price, or the margin you want.
  4. Read the margin or price, the profit and the markup.

The Formula

Find the margin: Profit = price − cost; Margin = profit ÷ price × 100; Markup = profit ÷ cost × 100. Find the price: Price = cost ÷ (1 − margin ÷ 100); Profit = price − cost

Margin and markup both start from the same profit but divide it by different numbers: margin by the selling price, markup by the cost. So the margin is always the smaller of the two. When finding a price, the calculator rounds up to the next cent, so the margin you actually get is never below the one you asked for.

Worked Example

Finding the margin: a candle costs $12.00 to make and sells for $20.00. The profit is $8.00, the margin is 8 ÷ 20 = 40%, and the markup is 8 ÷ 12 = 66.67%.

The same profit, two percentages: an item bought for $5.00 and sold for $6.50 makes $1.50. That is a 30% markup (1.50 ÷ 5.00) but only a 23.08% margin (1.50 ÷ 6.50).

Finding the price: to make a 40% margin on an $18.00 item, divide 18 by 0.60 to get $30.00, a $12.00 profit and a 66.67% markup.

Frequently Asked Questions

What is the difference between margin and markup?

Both describe the same profit. Margin divides it by the selling price, and markup divides it by the cost. A $1.50 profit on a $5.00 item sold for $6.50 is a 30% markup but a 23.08% margin, which is why mixing the two up leads to underpricing.

How do I turn a markup into a margin?

Divide the markup by 100 plus the markup, then multiply by 100: a 30% markup is 30 ÷ 130 = a 23.08% margin. To go the other way, divide the margin by 100 minus the margin: a 40% margin is 40 ÷ 60 = a 66.67% markup.

Why isn't adding 40% to the cost a 40% margin?

Adding 40% to an $18.00 cost gives $25.20, and the $7.20 profit is only 28.57% of that price. For a 40% margin, the price has to be $30.00.

Is this gross margin or net margin?

With the cost of an item, it is gross margin: the IRS works out gross profit by taking the cost of goods sold away from net receipts. For net margin, enter your total sales as the price and all your costs, including rent, fees and wages, as the cost.

Can a margin reach 100%?

No. A 100% margin would mean the item cost nothing, so the calculator only accepts margins below 100%. Markup has no ceiling: a 300% markup is a 75% margin.

Why is my margin slightly above my target?

The price is rounded up to the next cent. An item costing $7.25 at a 35% target margin is priced at $11.16, which gives a 35.04% margin. Rounding down to $11.15 would leave you just short, at 34.98%.

Sources: IRS, Publication 334 (2025), Tax Guide for Small Business, chapter 7 "Figuring Gross Profit"; Penn State Extension, What's the Difference Between Markup and Profit?