Margin Calculator
Compute margin %, markup %, selling price, and cost — starting from whichever pair you know. See profit broken down, a mini bar chart, and a margin gauge.
Background
For a product with cost C and selling price P:
- Profit = P − C
- Margin % =
- Markup % =
This calculator lets you choose what you want to solve for and fills in all the related numbers for you.
How to use this calculator
- Step 1: Choose a calculation mode depending on what you know (Cost & Price, Cost & Margin %, Cost & Markup %, or Price & Margin %).
- Step 2: Fill in the relevant inputs. For example, in “Cost & Margin %” mode, enter your unit cost and target margin percentage.
- Step 3: (Optional) Turn on the discount toggle and enter a % off to see how promotions change your profit and margin.
- Step 4: Click Calculate. The tool computes the missing price or cost, profit per unit, margin %, markup %, and, if applicable, discounted values.
- Step 5: Use the mini bar chart and gauge to quickly assess whether your margin is thin, healthy, or very high.
Formula & Equations Used
Let C be the cost per unit and P be the selling price per unit.
- Profit per unit:
-
Margin % (also called gross margin on sales):
Here the denominator is price, so we are asking “What fraction of the selling price is profit?”
-
Markup % (on cost):
Here the denominator is cost, so we are asking “What fraction of the cost is added as profit?”
-
Target price from cost and margin %:
where is the margin expressed as a decimal (e.g., 30% → 0.30).
-
Price from cost and markup %:
where is the markup as a decimal (e.g., 50% → 0.50).
- Discounted price and margin (if a discount d% is applied):
Example Problems & Step-by-Step Solutions
Example 1 — Margin from cost and price
A textbook costs your store \$32.00 per copy. You sell it for \$48.00. What are the profit per unit, margin %, and markup %?
-
Compute profit per unit.
So you earn \$16.00 per copy. -
Compute margin %.
Margin is about 33.3%. -
Compute markup % on cost.
Markup on cost is 50%.
Example 2 — Find price from cost and target margin
You want a 40% margin on a calculator that costs you \$18.00. What selling price should you set, and what markup % does that correspond to?
-
Use the margin formula to solve for price.
We want margin = 0.40 and cost = 18.00. So the selling price should be \$30.00. -
Check the margin.
Profit = . The target margin is met. -
Compute the markup %.
A 40% margin on price corresponds to about 66.7% markup on cost.
Margin Calculator — FAQs
What is the difference between margin and markup?
Margin is profit as a percentage of the selling price, while markup is profit as a percentage of the cost. For the same product, markup is always numerically larger than margin.
Is a 30% margin the same as a 30% markup?
No. A 30% margin means 30% of the selling price is profit. A 30% markup means 30% of the cost is added as profit. For example, if the cost is \$100 and you add a 30% markup, the price is \$130 and the margin is about 23.1%, not 30%.
What is a “good” margin?
It depends on the industry. Grocery and retail often operate on thin margins (5–20%), while software or digital products can have much higher margins. For student exercises, anything in the 20–40% range is often treated as a “healthy” margin, but real-life targets vary by business model.
Can margin ever be more than 100%?
Not in the usual cost–price sense. If cost is positive, margin % must be less than 100% because price must exceed cost but cannot be infinite. Situations that look like margins > 100% usually reflect mis-categorized costs or using margin and markup interchangeably.