Most people meet a markup and margin calculator the moment they are setting a price or reading one back to a supplier, which is also the moment they are least able to tell whether two percentages are comparable.
This page sets out exactly what this calculator computes: the markup formula, the margin formula, the markup vs margin difference that comes from using two different bases, and how rounding is applied before the result is shown. Then it runs one worked example with realistic figures so you can rerun the arithmetic yourself, and it lists the assumptions the answer rests on, including the one most tools hide, which is what counts as cost.
A rate is a fact with a date. This calculation uses no outside rate. The cost and the price are your inputs, and this page prints no typical markup or margin for any trade.
This is general information, not financial advice. It is not medical advice either. Check any figure against the source named on the page.
Here is the formula
Both formulas start from the same profit figure:
Profit = price − cost
Markup measures that profit against cost:
Markup = profit ÷ cost
Margin measures the same profit against price:
Margin = profit ÷ price
That is the whole markup vs margin difference. The profit is the same number in both. Only the base changes, and because price is larger than cost whenever there is a profit, margin is always the smaller percentage of the two.
Our markup vs margin calculator runs both formulas and shows each step.
The source for this formula
This is standard percentage arithmetic. No outside rate or table sits inside it, so the sources that matter are the ones for your inputs: your supplier invoice for cost and your own price list for price, each with the date you read it. The U.S. Small Business Administration’s guide to writing a business plan covers where pricing and cost figures sit in a plan, which is one place these two numbers are often written down side by side.
Worked example
The figures below are example inputs chosen to make the arithmetic easy to follow. They are not typical for any trade, and the arithmetic is the same in any currency.
- Example cost: 60. Example price: 100.
- Profit: 100 − 60 = 40.
- Markup: 40 ÷ 60 = 0.667, which is 66.7 per cent.
- Margin: 40 ÷ 100 = 0.40, which is 40 per cent.
One price, one cost, one profit, and two percentages. Both are correct. They answer different questions: markup answers how much you added to what you paid, and margin answers how much of each sale you keep before overheads.
Check it yourself the other way: 60 × (1 + 0.667) = 100, give or take rounding, and 100 × (1 − 0.40) = 60. You land back on the price and the cost.
Now replace the example cost and price with your own and run the same four lines.
Converting markup to margin and back
If you only have one of the two percentages, you can find the other without knowing the cost or the price. Write both as decimals first.
Margin = markup ÷ (1 + markup)
Markup = margin ÷ (1 − margin)
Using the example above:
- Markup to margin: 0.667 ÷ 1.667 = 0.40.
- Margin to markup: 0.40 ÷ 0.60 = 0.667.
If you want to set a price that gives a chosen margin, the formula is:
Price = cost ÷ (1 − target margin)
With the example cost of 60 and an example target margin of 0.40: 60 ÷ 0.60 = 100.
If you want to set a price that gives a chosen markup, the formula is simpler:
Price = cost × (1 + target markup)
With the example cost of 60 and an example target markup of 0.667: 60 × 1.667 = 100, give or take rounding. Both routes reach the same price because, in this example, the two targets describe the same profit.
Rounding
Round the percentage only at the end. If you round the markup to a whole number before converting it to a margin, the margin can drift. In the example, rounding 66.7 per cent down to 66 per cent before converting gives 0.66 ÷ 1.66 = 0.398, not 0.40. For a single product that is a small gap. Across a whole price list it can add up, so keep the unrounded figures in your spreadsheet and round only what you display.
This assumes
- Cost includes everything you decided to count as cost, and nothing else.
- Price is the price before any tax added at sale.
- There is one cost and one price per unit.
- Discounts are already taken off the price you entered.
- Both figures are in the same currency and from the same period.
When the markup vs margin difference causes errors
The arithmetic holds. The trouble starts when two people use the same word for different numbers:
- Quoting one, meaning the other. A supplier says a percentage and a buyer hears the other measure. Ask which base the figure uses.
- Applying a margin target as a markup. Adding a target margin percentage to cost gives a price that is too low for that margin. Use the price formula above.
- Different costs. One person counts only the purchase price. Another adds shipping or packaging. Agree what cost includes before comparing.
- Tax inside the price. If the price includes tax, take the tax out first, or the margin comes out larger than it is.
- Discounts after the fact. A margin worked out on the list price is not the margin on a discounted sale. Run it again on the price actually paid.
Checking a price list, step by step
If you keep prices in a spreadsheet, a short routine keeps the two measures apart.
- Give each measure its own column. One column for cost, one for price, one for profit, one for markup and one for margin. Label the last two clearly.
- Write the formula once. Put profit as price minus cost, markup as profit divided by cost, and margin as profit divided by price, then copy each formula down the column.
- Date the cost column. Supplier costs change. A note of when each cost was last read tells you which rows need checking.
- Look for rows where margin is not smaller than markup. Whenever profit is positive, margin should be the smaller figure. A row where it is not usually has a cost or price typed in the wrong place.
- Recheck after any discount. Add a column for the price actually paid, and work the margin out on that figure as well.
Questions to ask before you compare two figures
- Is this figure a markup on cost or a margin on price?
- What does cost include here?
- Is the price before or after tax and discounts?
- What date are the cost and price from?
If the answers differ between two figures, they are not comparable until you put them on the same base.
The related question: what about gross margin on a whole business?
The same formula works for a whole period: total sales minus the total cost of the goods sold, divided by total sales. It is still margin on price, just added up. What it does not include is overheads such as rent and wages, which is why gross margin and net profit are different numbers. For decisions about tax treatment or reporting, take the figures to an accountant. For the price arithmetic itself, our VAT and sales tax calculator helps take tax out of a price before you work out the margin.
Further reading
- U.S. Small Business Administration (sba.gov): planning and running a small business.
- Internal Revenue Service (irs.gov): federal tax information for businesses.
This is general information, not financial advice. It is not medical advice either. Check any figure against the source named on the page.
Expert Calculators Editorial