Margin & Markup Calculator
Analyze cost and selling price, or calculate a price for your own margin or markup target. See both percentages and the effect of rounding the target price upward.
Your cost, price & target
See the method ↓Enter amounts in the selected currency. Percentages use 20 for 20%. Quantities must be whole numbers. Grouped thousands and fractions are accepted.
Loading calculator… If this message remains, reload the page.
HOW THE CALCULATION WORKS
The same gross profit, measured against two different bases
- Gross profit per unit = selling price − entered cost. Gross margin (%) = profit ÷ selling price × 100. Markup (%) = profit ÷ cost × 100. A zero denominator is undefined.
- Price for target margin m = cost ÷ (1 − m/100), with positive cost and 0 ≤ m < 100%. Price for target markup u = cost × (1 + u/100), with positive cost and nonnegative markup up to 1,000,000%.
- When a price increment is selected, resulting unit price = ceiling(exact target price ÷ increment) × increment. This rounds UP to preserve the target, rather than rounding to the nearest price.
- Recalculate actual margin and markup from the resulting unit price. Multiply unit selling price, cost and profit by the whole-unit quantity for totals.
Worked example
For cost $20, target gross margin 30%, quantity 10 and a $0.01 increment: exact target price is 200/7, about $28.571429. Rounding UP gives $28.58 per unit. Actual gross margin is about 30.020994%, and markup is 42.9%. Revenue is $285.80, entered cost $200, and gross profit $85.80.
Defaults and assumptions
- Individual money inputs accept 0–1,000,000,000,000 currency units. Quantities are whole numbers from 1 to 1,000,000,000.
- Analyze existing cost and selling price is selected initially. Cost, selling price and target percentage start blank; quantity 1; currency USD; percentage display precision 3 decimals.
- Target modes initially use a 0.01 currency-unit price increment. Alternatives are 0.05, 1, or an exact unrounded estimate. Changing mode clears the target percentage so it is not silently reinterpreted.
Limitations
- This is gross profit from the entered cost only, not net profit after all business expenses. No automatic taxes, shipping, overhead, fees or operating costs. Enter a cost definition appropriate to your comparison.
- Analyze mode permits zero cost/price and below-cost sales. Margin is undefined when selling price is zero; markup is undefined when cost is zero. Target modes require positive cost to avoid a meaningless zero-price target claim.
- Exact target mode can produce fractional currency units that are not directly payable. Its displayed decimal is an approximation; choose an increment for a practical rounded price. No recommended profit target or market demand is supplied.
Precision and rounding
Inputs and calculations use exact rational arithmetic (fractions). Target-price increments round upward; discount billing rounds half-up to cents according to the chosen policy. An exact halfway amount such as 1.005 rounds to 1.01. Standard money displays use two decimals. Unrounded estimates, intermediate values and billing adjustments use six decimals with ≈ only when that rendering differs from the exact value. Displays use integer arithmetic, including large totals; negative display ties round away from zero. Displayed percentages are rounded and marked approximately when needed. Exact fractions remain in calculation steps and review downloads. Currency labels do not convert exchange rates.
Sources
Use the assumptions, worked example and sources to interpret your result. Estimates do not replace professional advice.
How to use this calculator
- Choose analysis, target margin or target markup. Enter cost and the values required by that mode.
- For a target, choose a price increment or an exact unrounded estimate. Enter the whole-unit quantity and currency label.
- Calculate and compare the actual margin, markup and gross-profit totals. Review the different percentage bases before using the result.
Common questions
Why are margin and markup different?
Margin divides gross profit by selling price. Markup divides the same profit by cost. A 50% markup is not a 50% margin.
Why round target prices upward?
Rounding down can miss the selected target. The tool first finds the exact target price, then rounds upward to your chosen increment and reports the actual resulting rates.
Does gross profit include every business expense?
No. It subtracts only the cost you entered. Unentered overhead, taxes and other expenses are excluded.
Report a problem or suggest a calculator
Found a confusing result, a missing option, or an idea for a new calculator? Send it privately to the site owner.
Opening the form loads Cloudflare Turnstile, a spam check that processes connection and device information. Privacy details.