Margin and markup both describe profit on a product, and both are expressed as percentages — which is exactly why they get confused. A shop owner who thinks “I add 40%” is earning a 40% margin is actually earning about 28.6%. Over a year, that misunderstanding can be the difference between profit and loss.
This guide gives the exact formulas, a conversion table, worked examples with hypothetical prices, the effect of discounts and sales tax, and a pricing checklist. All examples use illustrative numbers and exclude sales tax unless stated.
In this guide
- Gross profit, cost price and selling price
- The two formulas
- Converting between margin and markup
- Setting prices from a target
- More worked examples
- How discounts change your margin
- Sales tax, VAT and margin
- Gross margin for the whole store
- Category margin and sales mix
- When supplier prices rise
- Price points and rounding
- Gross margin vs. net margin
- Margin and markup in supplier conversations
- Common pricing mistakes
- Pricing checklist
Gross profit, cost price and selling price
| Term | Definition |
|---|---|
| Cost price | What you pay to acquire one unit, including delivery costs you assign to it. |
| Selling price | What the customer pays, excluding sales tax/VAT. |
| Gross profit | Selling price − cost price (per unit), or net sales − cost of goods sold (for a period). |
Example: a candle costs $30 and sells for $50 (before tax). Gross profit = 50 − 30 = $20.
The two formulas
Gross margin
Gross margin % = (selling price − cost) ÷ selling price × 100
Margin tells you what share of each sale is profit. Candle: 20 ÷ 50 × 100 = 40%. Out of every $1 of sales, $0.40 is gross profit.
Markup
Markup % = (selling price − cost) ÷ cost × 100
Markup tells you how much you added on top of cost. Candle: 20 ÷ 30 × 100 ≈ 66.7%.
Same product, same $20 profit — but the margin is 40% and the markup is about 66.7%, because the denominator is different. Margin can never reach 100% (unless cost is zero); markup can be any size.
Converting between margin and markup
Margin = markup ÷ (1 + markup) · Markup = margin ÷ (1 − margin) (as decimals)
| Markup | Equivalent margin | Margin | Equivalent markup | |
|---|---|---|---|---|
| 25% | 20.0% | 20% | 25.0% | |
| 40% | 28.6% | 30% | 42.9% | |
| 50% | 33.3% | 40% | 66.7% | |
| 66.7% | 40.0% | 50% | 100.0% | |
| 100% | 50.0% | 60% | 150.0% | |
| 150% | 60.0% |
Example check: a 40% markup gives 0.40 ÷ 1.40 = 0.2857, a margin of about 28.6% — the trap mentioned in the introduction.
Setting prices from a target
Price from a target margin
Selling price = cost ÷ (1 − target margin)
Cost $30, target margin 40%: 30 ÷ (1 − 0.40) = 30 ÷ 0.60 = $50.00.
Price from a target markup
Selling price = cost × (1 + markup)
Cost $30, markup 50%: 30 × 1.50 = $45.00. The resulting margin is 15 ÷ 45 = 33.3%, not 50%.
Many retailers set prices by markup (it is simple to apply to a cost price) but report and plan by margin (it relates directly to sales and to the profit-and-loss statement). Either is fine, as long as everyone knows which one is in use.
More worked examples
| Product (hypothetical) | Cost | Price (ex. tax) | Gross profit | Margin | Markup |
|---|---|---|---|---|---|
| Candle | $30.00 | $50.00 | $20.00 | 40.0% | 66.7% |
| Phone case | $4.00 | $12.00 | $8.00 | 66.7% | 200.0% |
| Bag of pet food | $24.00 | $30.00 | $6.00 | 20.0% | 25.0% |
| Power drill | $60.00 | $90.00 | $30.00 | 33.3% | 50.0% |
Each line uses the formulas above; you can verify any of them by dividing gross profit by price (margin) or by cost (markup).
How discounts change your margin
A discount comes entirely out of gross profit, so it reduces margin far more than the headline percentage suggests.
Example: the $50 candle (cost $30) is discounted by 20% to $40. Gross profit falls from $20 to $10, and margin falls from 40% to 10 ÷ 40 = 25%. Profit per unit has halved.
How much more must you sell?
Extra volume needed to keep the same gross profit = margin ÷ (margin − discount) − 1 (margin and discount as decimals of the original price)
| Original margin | Discount | Extra units needed |
|---|---|---|
| 40% | 10% | +33.3% |
| 40% | 20% | +100% |
| 50% | 10% | +25% |
| 30% | 10% | +50% |
At a 40% margin, a 20% discount requires selling twice as many units just to earn the same gross profit. Use discounts deliberately — to clear slow stock or attract new customers — and check the result afterwards in your sales reports.
Sales tax, VAT and margin
Calculate margin and markup on prices excluding sales tax or VAT. Tax collected from customers is not your revenue.
Example: a shelf price of $60 including 20% VAT corresponds to a net price of 60 ÷ 1.20 = $50. With a cost of $30 (excluding recoverable VAT), the margin is 40% — not (60 − 30) ÷ 60 = 50%. Tax rules differ by country, so confirm the treatment with your accountant.
Storing cost and selling prices and taxes per product keeps these calculations consistent — see product and inventory management.
Gross margin for the whole store
At store level, gross margin is calculated for a period:
Gross margin % = (net sales − cost of goods sold) ÷ net sales × 100
Example: a month with $84,000 of net sales and $50,400 cost of goods sold has a gross profit of $33,600 and a gross margin of 40%. This is one of the headline numbers in the retail KPIs guide. For it to be accurate, purchase costs must be recorded and stock must be counted — see purchase management and cycle counting. Shrink reduces real margin too: see shrinkage prevention.
Category margin and sales mix
A store’s overall margin is the weighted average of its categories. When the mix of sales shifts, the overall margin changes even if no price changes.
| Category | Sales (month A) | Margin | Gross profit |
|---|---|---|---|
| Accessories | $20,000 | 55% | $11,000 |
| Core products | $50,000 | 35% | $17,500 |
| Promotional lines | $14,000 | 20% | $2,800 |
| Total | $84,000 | 37.3% | $31,300 |
In month B, total sales stay at $84,000, but $4,000 of sales move from accessories (now $16,000) to promotional lines (now $18,000). Gross profit becomes 16,000 × 0.55 + 50,000 × 0.35 + 18,000 × 0.20 = $29,900, and the overall margin drops to about 35.6% — a $1,400 fall in gross profit with exactly the same revenue. Tracking margin by category reveals this; total sales alone never will.
When supplier prices rise
If the cost of the $50 candle rises from $30 to $33 and the price stays the same, margin falls from 40% to (50 − 33) ÷ 50 = 34%. To keep a 40% margin, the new price must be 33 ÷ 0.60 = $55.00.
Recording purchase prices on every delivery makes these changes visible as soon as they happen — see purchase management and supplier records. Review the products with the biggest sales first: ABC analysis tells you which ones they are.
Price points and rounding
Calculated prices rarely land on attractive price points. After calculating the target price, round to a price point that fits your store, then recheck the margin. For example, pricing the candle at $49.99 instead of $50.00 changes the margin from 40.0% to about 39.99% — a negligible difference. Larger rounding steps (for example from $47.20 to $49.00 or $45.00) deserve a quick margin check before you print new labels.
Gross margin vs. net margin
Gross margin only subtracts the cost of the goods themselves. It does not include rent, wages, energy, card fees, marketing or loan repayments. Those operating costs are paid out of gross profit, and what remains is net profit; expressed as a share of sales, it is the net margin.
This is why a product with a healthy-looking 40% gross margin can still lose money if it takes a lot of staff time, shelf space or returns. When you compare products, look at gross margin first, then ask what each one costs to sell. When you compare your store with others, make sure you are comparing the same kind of margin — gross with gross, net with net.
A practical habit: once a year, divide your total operating costs by your gross margin percentage. The result is the sales level at which gross profit exactly covers operating costs — your break-even sales. If operating costs are $300,000 a year and gross margin is 40%, break-even sales are 300,000 ÷ 0.40 = $750,000. Every sale above that contributes to profit.
Margin and markup in supplier conversations
Suppliers often talk about a “recommended retail price” and a “trade discount”. A 40% trade discount off the recommended price means you pay 60% of it — so selling at the recommended price gives a 40% gross margin (before tax), which corresponds to a 66.7% markup. Converting the supplier’s language into your own target metric before negotiating avoids misunderstandings, especially when a supplier quotes “margin” but means markup, or the other way round.
Common pricing mistakes
- Applying a markup and calling it a margin — the classic error that overstates profitability.
- Forgetting delivery and handling costs in the cost price, which makes every margin look better than it is.
- Calculating on tax-inclusive prices, which counts tax as profit.
- Leaving prices unchanged after cost increases because nobody compared the new invoice with the old price.
- Discounting by habit without calculating how much extra volume the discount requires.
- Using one target for every category when accessories, core lines and promotional products carry very different margins.
Pricing checklist
- Agree internally whether targets are expressed as margin or markup.
- Use cost including delivery, and prices excluding tax.
- Set prices from a target margin by category, then round to sensible price points.
- Review margins when supplier prices change — check purchase price history.
- Calculate the extra volume needed before running any discount.
- Track margin by category monthly and investigate drops.
Record cost and selling prices on every product and see what sells: the free edition includes products, categories and sales history.
Frequently asked questions
What is the difference between margin and markup?
Both use the same gross profit, but margin divides it by the selling price and markup divides it by the cost. A $30 product sold for $50 has a 40% margin and a 66.7% markup.
How do I convert markup to margin?
Margin = markup ÷ (1 + markup). For example, a 50% markup gives 0.5 ÷ 1.5 = 33.3% margin.
How do I price a product for a 40% margin?
Divide the cost by (1 − 0.40). A $30 cost gives a selling price of $50 before tax.
Should margin be calculated with or without sales tax?
Without. Use net selling prices excluding sales tax or VAT, because the tax is collected on behalf of the government.
Why does a 20% discount hurt profit so much?
Because the whole discount comes out of gross profit. At a 40% margin, a 20% discount halves the profit per unit, so you need to sell twice as many units to earn the same gross profit.
