Margin Calculator
Work out profit margin and markup from your cost and selling price, or find the price that hits a target margin or markup. Margin and markup use the same profit but different denominators, and mixing them up is the most common pricing error.
Your product
Results
Gross margin
—
Profit per unit
—
Markup
—
Price ÷ cost
—
Show the mathHow it was calculated
Margin = (Price − Cost) ÷ Price · Markup = (Price − Cost) ÷ Cost
Gross margin per unit only. It doesn't include overheads, payment fees, returns or taxes on profit, so a healthy gross margin can still be a net loss.
Margin vs markup
Margin and markup both describe the same profit: the gap between what an item costs you and what you sell it for. The difference is what that profit is compared against. Gross profit margin is profit as a percentage of the selling price. Markup is profit as a percentage of the cost.
Take an item that costs $60.00 and sells for $100.00. The profit is $40.00. As a share of the price that is a 40.00% margin; as a share of the cost it is a 66.67% markup. Same item, same profit, two very different percentages. Because cost is always smaller than price when you make a profit, markup is always the larger number.
Which one to use depends on the question. Accountants, lenders and investors talk in margin because it lines up with the income statement: a 40% gross margin means 40 cents of every sales dollar is left after the cost of goods. Buyers and shop owners often price with markup because it starts from the number they know, the invoice cost. Trouble starts when someone sets a markup believing it is a margin.
Margin and markup formulas
Profit = Price − Cost
Gross margin % = Profit ÷ Price × 100
Markup % = Profit ÷ Cost × 100
Price from margin = Cost ÷ (1 − Margin ÷ 100)
Price from markup = Cost × (1 + Markup ÷ 100)
Markup = Margin ÷ (100 − Margin) × 100 · Margin = Markup ÷ (100 + Markup) × 100
The price-from-margin formula is the one people get wrong. Dividing by (1 − margin) is needed because the margin is a share of a price you don't know yet. Multiplying cost by (1 + margin) only works for markup.
Two edge cases are worth knowing. A margin of 100% or more is impossible for a product with any cost, because the price would have to be infinite, so the calculator rejects it. And with a cost of zero, a sample or a digital good, margin is 100% but markup is undefined, since there is nothing to divide by. The calculator shows "—" for markup in that case rather than an infinite number.
Margin to markup conversion table
Find the margin you want in the first column and read across for the markup that produces it, and the number to multiply cost by. The figures are computed with the formulas above and rounded to two decimals.
| Gross margin | Markup | Price = cost × |
|---|---|---|
| 5% | 5.26% | 1.053 |
| 10% | 11.11% | 1.111 |
| 15% | 17.65% | 1.176 |
| 20% | 25.00% | 1.250 |
| 25% | 33.33% | 1.333 |
| 30% | 42.86% | 1.429 |
| 35% | 53.85% | 1.538 |
| 40% | 66.67% | 1.667 |
| 45% | 81.82% | 1.818 |
| 50% | 100.00% | 2.000 |
| 60% | 150.00% | 2.500 |
| 70% | 233.33% | 3.333 |
| 75% | 300.00% | 4.000 |
| 80% | 400.00% | 5.000 |
| 90% | 900.00% | 10.000 |
Note how quickly markup climbs past 50% margin: a 75% margin needs a 300% markup, and 90% needs 900%.
Worked example: pricing a product for a target margin
A shop buys a product for $12.50 landed (including freight) and wants a 35% gross margin. Using the margin formula: $12.50 ÷ (1 − 0.35) = $19.23. Check: profit is $6.73, and $6.73 ÷ $19.23 = 35.00%. The equivalent markup is 53.85%.
The mistake version: add 35% to cost. $12.50 × 1.35 = $16.88, which leaves $4.38 of profit, a margin of only 25.93%. On a thousand units that gap is $2,350.00 of gross profit that the plan assumed and the shop never earns.
Prices here are before sales tax. Tax is added at checkout and passed on to the state, so it never belongs in a margin calculation; the sales tax calculator handles that step separately.
Gross margin, discounts and net margin
Discounts come straight out of margin, and the effect is bigger than the headline percentage. The $60.00-cost item above earns a 40.00% margin at $100.00. Put it on sale at 20% off, $80.00, and the profit drops from $40.00 to $20.00, a 25.00% margin. A 20% discount halved the profit per unit. Use the discount calculator to find the sale price, then enter it here as the selling price to see what is left.
This calculator measures gross margin: price minus the direct cost of the item. Net margin goes further and subtracts operating expenses such as rent, wages, marketing, software, card processing fees and returns, then divides what remains by total revenue. A product line can show a comfortable gross margin and still lose money once those costs are spread across it, which is why gross margins in retail are usually far above the net margin a business reports.
Margin is also a per-sale measure with no time element. To judge whether a whole investment, such as buying inventory, equipment or an ad campaign, paid off over months or years, use the ROI calculator, which compares total gain with the amount invested.
Common pricing mistakes
- Treating markup as margin. Adding 40% to cost gives a 28.57% margin, not 40%. If a target is stated as a margin, divide cost by (1 − margin); don't multiply.
- Leaving costs out. Using the supplier's unit price without freight, duty or packaging makes every margin look better than it is. Enter the full landed cost.
- Pricing on the tax-inclusive amount. Margin is calculated on the price you keep, before sales tax or VAT.
- Comparing percentages with different bases. A supplier quoting "50% markup" and an accountant reporting "33% margin" can be describing the same product. Convert one to the other before comparing, using the table above.
- Forgetting that percentage points and percentages differ. Moving from a 30% to a 33% margin is a 3 percentage-point rise but a 10% increase in margin. The percentage calculator separates the two.
Frequently asked questions
Can a profit margin be more than 100%?
No. Margin is profit divided by the selling price, and profit can never exceed the price unless the cost is negative. A margin approaches 100% only as cost approaches zero. Markup has no ceiling: buying at $5 and selling at $20 is a 300% markup but a 75% margin. If a figure above 100% is quoted, it is a markup.
What markup gives a 30% profit margin?
A 42.86% markup. Divide the margin by (100 − margin) and multiply by 100: 30 ÷ 70 × 100. Put another way, multiply cost by 1.4286, or divide cost by 0.70. A $70 cost becomes a $100 price, leaving $30 of profit, which is 30% of the price.
What is keystone pricing?
Keystone is a retail rule of thumb for setting the price at double the wholesale cost. That is a 100% markup and a 50% gross margin: a $20 item sells for $40.00 with $20.00 of profit. Retailers often go above keystone for slow-moving or high-handling goods and below it for commodities.
Should sales tax be included in the price when calculating margin?
No. Use the pre-tax selling price. Sales tax and VAT are collected on behalf of the government and passed on, so they are not revenue and including them would overstate the margin. The same applies to deposits or pass-through fees you collect and remit.
What should count as cost when calculating gross margin?
Use the full cost of getting the item ready to sell, often called landed cost or cost of goods sold: the purchase price plus inbound freight, import duties, packaging and any per-unit manufacturing cost. Rent, salaries and advertising are operating expenses and come out later, in net margin, not in the per-item gross margin.
Related calculators
- Discount Calculator
See how a sale price or stacked discounts change what you charge.
- ROI Calculator
Measure the return on an investment over time, not per unit sold.
- Sales Tax Calculator
Add tax to a pre-tax price or extract it from a total.
- Percentage Calculator
Percent of a number, percent change and percentage points.
