Markup Formula in Excel and How It Differs From Margin
By ExcelReady TeamUpdated 6 min read
The short answer
The markup formula in Excel is =(Price-Cost)/Cost, formatted as a percentage. For a cost in B2 and a price in C2, type =(C2-B2)/B2. To set a price from a markup rate in E1, use =B2*(1+$E$1). Markup divides profit by cost; margin divides profit by price, so a 50% markup is only a 33.3% margin.
Key takeaways
- Markup is profit divided by cost: =(C2-B2)/B2, formatted as a percentage.
- To price from a markup rate, multiply the cost by one plus the rate: =B2*(1+$E$1).
- Margin divides by the price instead, so markup is always the bigger number for the same product.
- Convert markup to margin with =A2/(1+A2) and margin to markup with =A2/(1-A2).
- Lock the rate cell with $ signs (F4) and round prices with ROUND so they match the price tag.
On this page+
The markup formula in Excel is =(Price-Cost)/Cost: the profit on an item divided by what it cost you. To go the other way and set a price from a markup rate, multiply the cost by one plus the rate. This guide shows both formulas on a small price list, explains how markup differs from margin, and covers the mistakes that lead to wrong prices. It is for anyone pricing products, checking supplier quotes or answering a retail or finance Excel test.
What is markup?#
Markup is how much you add on top of the cost, shown as a percentage of the cost. If a desk lamp costs 40 and you sell it for 50, you added 10. That 10 is 25% of the cost, so the markup is 25%.
The formula has three parts:
=(Price - Cost) / Cost- Price - Cost is the profit per item (sometimes called gross profit).
- / Cost turns it into a share of the cost.
- Format the cell as a percentage (Windows: Ctrl+Shift+%; Mac: ⌃⇧%) so 0.25 shows as 25%.
Markup is the same calculation as a percent change from cost to price. If you know the percent change formula, you already know markup.
How to calculate markup in Excel#
To calculate markup for a whole list, put the cost and price side by side and fill one formula down. Here is a small price list:
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Product | Cost | Price | Markup |
| 2 | Notebook | 4.00 | 6.00 | 50% |
| 3 | Mug | 5.50 | 8.80 | 60% |
| 4 | Desk lamp | 40.00 | 50.00 | 25% |
| 5 | Backpack | 22.00 | 30.80 | 40% |
| 6 | Phone case | 8.00 | 20.00 | 150% |
In D2, type:
=(C2-B2)/B2Press Enter, then fill down to D6 (Windows: Ctrl+D; Mac: ⌘D). The notebook shows 50%: a profit of 2 on a cost of 4. The brackets matter. Without them, Excel divides B2 by B2 first and returns the wrong number, because division happens before subtraction.
The phone case shows 150%. Markup can go above 100%, because the profit can be bigger than the cost. Practise percent change in a live spreadsheet to get fast at this pattern.
How to set a price from a markup rate#
To find a selling price, multiply the cost by one plus the markup rate. Put the rate in its own cell so you can change it once for the whole list. With a 35% markup in E1:
=B2*(1+$E$1)For a cost of 12.40, the price is 16.74 (12.40 × 1.35). The $ signs make $E$1 an absolute reference: it stays on E1 when you fill the formula down, while B2 changes to B3, B4 and so on. Press F4 while the cursor is on E1 to add the signs (Mac: ⌘T or fn+F4). Without them, the formula in row 3 would look at E2, which is empty, and return just the cost.
Practise absolute references if the $ signs are new to you. The guide to increasing a number by a percentage uses the same 1+rate pattern for price rises.
Round prices so they match the price tag#
Prices from a markup formula often have long decimals, such as 12.34 × 1.35 = 16.659. Wrap the formula in ROUND so the stored price is the price you charge:
=ROUND(B2*(1+$E$1),2)The 2 means two decimal places. To always round up to the next whole unit, use ROUNDUP with 0: =ROUNDUP(B2*(1+$E$1),0). The ROUND function guide explains the options. Rounding matters in totals too: if you only format to two decimals, Excel still adds the hidden decimals, and an invoice can be a cent off.
Markup vs margin: what's the difference?#
Markup and margin use the same profit, but divide by different numbers. Markup divides by the cost. Margin divides by the price.
| Markup | Margin | |
|---|---|---|
| Formula | =(Price-Cost)/Cost | =(Price-Cost)/Price |
| Desk lamp (cost 40, price 50) | 25% | 20% |
| Notebook (cost 4, price 6) | 50% | 33.3% |
| Phone case (cost 8, price 20) | 150% | 60% |
| Can it pass 100%? | Yes | No |
Because the price is always bigger than the cost (when you make a profit), the markup is always the bigger percentage. That is why the two numbers get confused: a seller says "50%" and means markup, while a manager reads it as margin. The guide to profit margin formulas in Excel covers margin in depth, including pricing for a target margin.
How to convert between markup and margin#
You can convert one percentage into the other without knowing the cost or price. With the percentage in A2:
| Convert | Formula | Example |
|---|---|---|
| Markup to margin | =A2/(1+A2) | 50% markup → 33.3% margin |
| Margin to markup | =A2/(1-A2) | 25% margin → 33.3% markup |
A few handy pairs to remember:
| Markup | Margin |
|---|---|
| 25% | 20% |
| 50% | 33.3% |
| 100% | 50% |
So to earn a 50% margin, you need a 100% markup: buy for 10, sell for 20.
Common markup mistakes#
Most wrong prices come from one of these:
- Dividing by the price instead of the cost.
=(C2-B2)/C2is margin, not markup. Check which one the question asks for. - Adding the rate to the cost.
=B2+35%adds 0.35, not 35% of the cost. Use=B2*(1+35%). - Pricing for a margin with the markup formula. For a 25% margin,
=B2*(1+25%)is wrong. Use=B2/(1-25%). For a cost of 40, that gives 53.33, not 50. - Missing brackets.
=C2-B2/B2subtracts 1 from the price. Write=(C2-B2)/B2. - Forgetting the
$signs. A rate cell without$shifts as you fill down and gives wrong prices from row 3 onward. - Mixing markup with a discount. A 20% markup followed by a 20% discount doesn't bring you back to the cost: 100 × 1.2 × 0.8 = 96. The article on price lists with discounts shows how to handle both.
For more percentage basics, see the Excel percentage formula guide.
Practise it#
Markup is one formula, but in a test you need it right the first time, with the brackets and $ signs in place. Practise percent change in a live spreadsheet, then practise absolute references: you type each formula and ExcelReady checks it instantly. Start with the price exercise on this page, then try the finance Excel test for timed practice.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
Every product gets the markup rate in E1. Click C2 and calculate the selling price for the cost in B2, rounded to 2 decimals, with E1 locked using $ signs.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | ||||||
| 2 | ||||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 |
Tip: Price = Cost × (1 + markup). Put it inside ROUND with 2 as the second argument, and write E1 as $E$1.
Practise this in a lesson
Frequently asked questions
What is the formula for markup in Excel?
Markup is (Price - Cost) / Cost. With the cost in B2 and the price in C2, type =(C2-B2)/B2 and format the cell as a percentage. A cost of 40 and a price of 50 gives a 25% markup.
How do I add a markup to a cost in Excel?
Multiply the cost by one plus the markup rate. For a cost in B2 and a 35% markup in E1, use =B2*(1+$E$1). The $ signs keep E1 fixed when you fill the formula down.
Is a 50% markup the same as a 50% margin?
No. A 50% markup gives a 33.3% margin, because markup divides the profit by the cost and margin divides it by the higher price. To get a 50% margin you need a 100% markup.
How do I convert margin to markup in Excel?
Use =A2/(1-A2), where A2 holds the margin as a percentage. A 25% margin becomes a 33.3% markup. To go the other way, from markup to margin, use =A2/(1+A2).
Can markup be more than 100%?
Yes. A product that costs 8 and sells for 20 has a 150% markup. Margin can never reach 100%, but markup has no upper limit.