Markup and margin both describe the gap between what a product costs you and what you charge for it, but they measure that gap from different bases. Markup is calculated on cost, margin is calculated on price, and the two numbers are never the same for the same deal. A spreadsheet that mixes them up will quote prices that look profitable and are not.
This guide sets out the formulas, shows how to build a pricing calculator that handles both directions, and covers the errors that appear most often in working files.
Module A: Glossary and Core Definitions
Terms used in this guide
- Cost (C): The amount you pay to acquire or make one unit, including materials, inbound carriage and direct packaging. Use the landed cost where you can.
- Price (P): The amount the customer pays for one unit, before any discount, excluding sales tax where the tax is passed through.
- Markup (M): The profit added to cost, expressed as a percentage of cost.
- Margin (G): The share of the price that remains after cost, expressed as a percentage of price. Also called gross margin in most accounts.
- Net price: The price after discounts and after removing any sales tax that is collected for the government and not kept by the business.
- Contribution: The money left from a sale after variable costs are deducted, used to cover fixed overheads.
Why the two figures never match
Markup divides profit by cost. Margin divides profit by price. Because price is always larger than cost (when you make a profit), the margin percentage is always smaller than the markup percentage for the same deal.
A product bought for £40 and sold for £60 has:
- Profit of £20
- Markup of 50% (£20 ÷ £40)
- Margin of 33.3% (£20 ÷ £60)
The profit is identical. The percentages differ because the denominator differs.

Skip the setup
Profit Loom Pricing Calculator
Work out cost, markup, margin and platform fees for each product, so every price you set leaves a profit.
Module B: Formulas for Each Direction
A pricing calculator needs four conversions: markup to price, margin to price, price to markup, and price to margin. The first two drive quoting. The last two check what a price actually earns.
Calculating markup and margin from cost and price
Use these when you already have a price and want to know what it earns.
- Markup: (Price − Cost) ÷ Cost
- Margin: (Price − Cost) ÷ Price
Calculating price from a target markup or margin
Use these when you start from a target and need the price to hit it.
- Price from markup: Cost × (1 + Markup)
- Price from margin: Cost ÷ (1 − Margin)
Note the difference in the second formula. A 40% margin does not mean adding 40% to cost. It means cost must equal 60% of the price, so the price is cost divided by 0.6, which gives a figure 66.7% higher than cost.
Converting between markup and margin
If you have one and need the other, use these rules:
- Markup from margin: Margin ÷ (1 − Margin)
- Margin from markup: Markup ÷ (1 + Markup)
A 25% margin equals a 33.3% markup. A 100% markup equals a 50% margin. A 60% margin requires a 150% markup.
Module C: Building the Calculator Workbook
Input layout
Keep inputs in one block, clearly separated from calculations. A simple layout:
- Cell B2: unit cost (landed)
- Cell B3: target markup (as a percentage)
- Cell B4: target margin (as a percentage)
- Cell B5: sales tax rate, where applicable (for example, 20% for UK standard VAT)
- Cell B6: discount rate to test, where applicable
- Cell B7: charm-pricing rule, such as “end in .99”
Format input cells with a fill colour that signals they are editable, and lock or protect the formula cells. Put the calculations in a separate sheet or in a clearly labelled column block.
Formula set
The table below assumes unit cost is in B2, target markup in B3, target margin in B4 and a price to test in D2. Adjust the references to suit your layout. The same formulas work in Excel and Google Sheets.
| Purpose | Formula | Notes |
|---|---|---|
| Price from target markup | =B2*(1+B3) | Returns the net price before tax |
| Price from target margin | =B2/(1-B4) | Fails if margin is 100% or more |
| Markup from a tested price | =(D2-B2)/B2 | Use for checking a quoted price |
| Margin from a tested price | =(D2-B2)/D2 | The figure most finance reviews use |
| Gross price with tax | =B5*(1+B6) | B6 holds the tax rate; rename cells to suit |
| Net price from a gross price | =D2/(1+B6) | Reverse VAT before measuring margin |
| Price after discount | =D2*(1-B7) | B7 holds the discount rate being tested |
| Charm price ending in .99 | =CEILING(D2,1)-0.01 | Rounds up to the next whole unit, then drops one penny |
Guards and validation
Most calculator failures come from inputs the formulas were never designed to handle. Add these controls:
- Margin ceiling: Apply data validation to the margin cell so it accepts only values from 0% to 99.9%. A margin of 100% would require an infinite price.
- Zero-cost protection: Wrap markup formulas in
IFso a blank or zero cost returns a message rather than#DIV/0!. For example:=IF(B2=0,"Enter cost",(D2-B2)/B2). - Negative margin flag: Use conditional formatting to shade any margin below zero in red. A negative figure means the price loses money before overheads.
- Error trap: Wrap the whole output block in
IFERRORonly after the individual checks are in place, so genuine input errors remain visible.
Rounding to a sellable price
A calculated price of £72.7272 is not a price anyone will charge. Round in one place, at the end of the chain, so the displayed figure and the figure used for margin checks are the same.
- Use
ROUND(x,2)to round to pence. - Use
CEILING(x,1)-0.01to move to a .99 ending. This always rounds up, so the margin you calculated is protected rather than eroded. - Check the margin again after rounding. The rounded price is the price you actually sell at.
Module D: Choosing Between Markup and Margin
Both measures are valid. The right one depends on who is reading the number and what decision it supports.
Comparison of the two measures
| Attribute | Markup | Margin |
|---|---|---|
| Base of the calculation | Cost | Price |
| Range | 0% to unlimited | 0% to below 100% |
| Quoting from known cost | Direct, one multiplication | Requires division by (1 − target) |
| Matches financial statements | No | Yes, gross margin is reported this way |
| Easy to compare against peers | Less so | Usually preferred |
| Common in | Trade, wholesale, job costing | Retail, distribution, management reporting |
| Common error | Treating a 30% markup as a 30% margin | Adding a margin percentage to cost |
Decision rules
- Use markup when you price from a cost list. A supplier price rises by 4%, your prices follow by applying the same markup to the new cost. This is the fastest way to reprice a catalogue.
- Use margin when you report to owners, lenders or a finance team. Gross margin is the figure in management accounts. Reporting markup where margin is expected invites confusion.
- Use margin when comparing with sector benchmarks. Published benchmarks are almost always expressed as margin.
- Use both in the calculator, and label each clearly. The calculator costs nothing to keep and removes the argument about which figure someone meant.

Ready-made template
A simple pricing calculator for handmade and small-batch products, with margin and fee maths built in.
Module E: Worked Example
This example prices a single product through the full chain: cost, target, tax, charm price, discount test and final margin.
Step 1: Establish landed cost
- Supplier price: £36.00
- Inbound carriage, allocated per unit: £2.50
- Retail packaging: £1.50
- Landed unit cost: £40.00
Step 2: Set a target margin and derive the net price
A target margin of 45% is set for the category.
- Net price = £40.00 ÷ (1 − 0.45) = £40.00 ÷ 0.55 = £72.73
- Equivalent markup = 0.45 ÷ 0.55 = 81.8%
Check the markup route gives the same answer: £40.00 × 1.818 = £72.72, which matches within rounding.
Step 3: Add UK VAT
The standard VAT rate is 20%. The 45% margin applies to revenue the business keeps, so it applies to the net price, not the gross price shown to the customer.
- Gross before rounding = £72.73 × 1.20 = £87.28
- Charm price = CEILING(£87.28, 1) − £0.01 = £87.99
Step 4: Measure what the charm price actually earns
- Net revenue = £87.99 ÷ 1.20 = £73.33
- Profit per unit = £73.33 − £40.00 = £33.33
- Margin = £33.33 ÷ £73.33 = 45.5%
- Markup = £33.33 ÷ £40.00 = 83.3%
The charm rounding has improved the margin slightly, which is the direction you want. Had the formula rounded down to £87.00, the margin would have fallen to about 45.0%, below target, and the calculator would have flagged it.
Step 5: Test a 20% promotion
The promotion is applied to the gross price.
- Promotional gross = £87.99 × 0.80 = £70.39
- Net revenue = £70.39 ÷ 1.20 = £58.66
- Profit per unit = £58.66 − £40.00 = £18.66
- Margin = £18.66 ÷ £58.66 = 31.8%
A 20% discount on the shelf price removed roughly 13.7 margin points. This is the most useful output of the whole calculator. Run every planned promotion through it before it goes live.
Step 6: Record the result
Log the final figures in the calculator’s output block:
- Net price: £73.33
- Gross price: £87.99
- Markup: 83.3%
- Margin: 45.5%
- Margin after 20% promotion: 31.8%
- Status: within target, promotion approval required below 35% margin
Module F: Common Mistakes
These errors appear in most pricing workbooks reviewed in practice. Check each one against your own file.
Mistake 1: Treating markup as margin
A 50% markup is a 33.3% margin, not 50%. A quote built on the wrong figure will be short on profit by a wide margin, and the gap grows as the markup rises. At an 80% markup, the margin is 44.4%. At 100%, it is 50%. The error looks small until the numbers are large.
Mistake 2: Adding the margin percentage to cost
Applying a 40% margin as “cost plus 40%” gives a margin of 28.6%, not 40%. The correct formula divides cost by (1 − 40%).
Mistake 3: Applying a discount to the margin rather than the price
Discounts reduce the price. The margin falls faster than the discount percentage, because cost stays the same. A 10% discount on a product with a 40% margin does not reduce the margin to 30%. It reduces it to about 33%, and the effect grows sharply when margins are already thin.
Mistake 4: Measuring margin on a tax-inclusive price
A gross price includes VAT that belongs to the government. Measuring margin on it overstates profit. In the worked example, the same £87.99 shows a margin of 49.6% on a gross basis and 45.5% on a net basis. Always reverse tax first.
Mistake 5: Using a cost that excludes real costs
The calculator is only as accurate as the cost input. Common omissions include inbound freight, duty, packaging, payment fees, returns allowance and warehouse handling. Each one moves the margin. Add them to the cost cell, or keep a separate cost build-up sheet that feeds into it.
Mistake 6: Rounding too early
Rounding the net price to the nearest pound, then rounding again for the charm price, compounds the error. Keep full decimals until the final display step.
Mistake 7: Hard-coding figures in formulas
A formula such as =B2*1.5 works until the markup changes. Every rate, tax figure and discount should live in an input cell, so the formula stays the same and only the input is edited.
Module I: Maintenance Checklist
Use this checklist when setting up the calculator and again at each quarterly review.
- Input block is separate from formulas, and input cells are colour-coded.
- Formula cells are protected against accidental overwriting.
- Margin input is restricted to a value below 100%.
- Markup and margin formulas match the definitions in Module A.
- Tax is reversed before margin is measured.
- Landed cost includes freight, duty and packaging.
- Rounding is applied once, at the end of the chain.
- Promotional discounts are tested against the minimum acceptable margin.
- A known product has been checked by hand against the output.
- Both markup and margin are labelled on every output.
- The master copy is stored in one location, with a named owner.
- Supplier cost changes are entered within the period set by the business.

Get the finished file
Crumbcount Recipe Cost Calculator
Cost every recipe down to the gram and set menu or bakery prices that cover ingredients and time.