The formula
Markup %ExcelGoogle Sheets
=(B2-A2)/A2In F2 → 53.85%
Price for target marginExcelGoogle Sheets
=A2/(1-C2)In F3 → $43.33
Price from markupExcelGoogle Sheets
=A2*(1+D2)In F4 → $39.00
Margin → markupExcelGoogle Sheets
=C2/(1-C2)In F5 → 66.67%
✓ Tested. All 4 Excel results in this example were recalculated in LibreOffice Calc 25.2 and matched the values shown.
Worked example
Paste the data below into a blank sheet starting at cell A1 (or download the cheat sheet, where every example is set up). Highlighted cells hold the formulas and show the expected results.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Cost | Price | Target margin | Markup | ||
| 2 | 26 | 40 | 40% | 50% | 53.85% | |
| 3 | $43.33 | |||||
| 4 | $39.00 | |||||
| 5 | 66.67% |
How it works
- (B2-A2)/A2
- Markup is profit ÷ cost.
- A2/(1-C2)
- Price such that (price − cost) ÷ price = target margin.
- C2/(1-C2)
- Equivalent markup for a margin.
Common errors and fixes
Why does the formula return #DIV/0!?
Target margin is 100%.
Price too low?
Using cost × (1 + margin) gives a smaller margin than intended.
Does this work in Google Sheets?
Yes. The formulas on this page work the same way in Google Sheets.