MATH · MARGIN AND MARKUP
Margin and Markup Calculator
Calculate gross margin % and markup % from cost and price — both displayed together so you can see exactly how the two differ and avoid the most common pricing mistake.
About This Calculator
Gross margin and markup are two different ways to express the same profit number — yet they produce very different percentages and are routinely confused. Enter your cost and selling price and this calculator shows both simultaneously so you can see the distinction at a glance.
How It Works
Gross Margin % measures profit as a share of the selling price; Markup % measures profit as a share of the cost. Both start from the same profit figure (price minus cost) but divide by different denominators. This calculator computes both, plus the absolute profit, and guards against divide-by-zero when price or cost is zero.
The Formula
Gross Margin % = (Price − Cost) / Price × 100 Markup % = (Price − Cost) / Cost × 100
- Price
- selling price (revenue per unit)
- Cost
- cost of goods / cost price
Frequently Asked Questions
- What is the difference between margin and markup?
- Gross margin uses the selling price as the denominator: (price−cost)/price×100. Markup uses cost as the denominator: (price−cost)/cost×100. Because cost is always smaller than price, markup is always a larger percentage than margin for the same inputs. For example: cost $60, price $100 → margin = 40%, markup = 66.7%.
- Which should I use — margin or markup?
- Margin is typically used in financial reporting and retail (gross margin, contribution margin). Markup is typically used when setting prices from a cost-plus baseline. Understand which one your team or software is using — mixing the two is a common and costly mistake.
- What if my cost is higher than my price?
- The calculator still works — it returns negative values for both margin and markup, indicating you are selling below cost. This is a valid scenario (promotional pricing, loss leaders) but the negative numbers flag it clearly.
- Why does the calculator show an error when cost or price is zero?
- Both formulas divide by either price or cost. A zero in either position causes division by zero, which is mathematically undefined. Enter a non-zero value for both inputs to get a result.