Margin Calculator
Work out gross margin, markup, profit per unit, cost or selling price from whichever two figures you already know. Solve a price from a target margin, convert margin to markup, and add a quantity to see total revenue and total profit. Margin tells you what share of revenue you keep, while markup tells you how much you added on top of cost.
Formula
Worked example
Cost $40, price $100: profit = 100 − 40 = $60. Margin = 60 ÷ 100 × 100 = 60%. Markup = 60 ÷ 40 × 100 = 150%. Reversing, a $40 cost at a 60% target margin needs a price of 40 ÷ (1 − 0.60) = $100.
Six ways to solve it: pick the two figures you know
This calculator works in both directions. Tell it which two values you already have and it solves for the rest. Know your cost and selling price? It returns margin, markup and profit. Know your cost and a target margin? It works backward to the price you must charge to hit that margin (price equals cost divided by one minus the margin). You can also start from cost and markup, price and margin, price and profit, or cost and profit. Every mode reports the same five linked figures: cost, selling price, profit per unit, gross margin and markup, so you can move freely between pricing from cost and pricing from a revenue target.
Margin vs. markup, the difference that trips people up
Margin and markup both measure profit, but against different bases. Gross margin divides profit by the selling price, telling you what share of each dollar of revenue you keep. Markup divides the same profit by the cost, telling you how much you added on top of what you paid. Because price is always larger than cost on a profitable item, the markup percentage is always bigger than the margin percentage, and confusing the two is a common pricing mistake that quietly erodes profit. A 50% markup is only a 33% margin, so charging a markup when you meant a margin leaves money on the table.
From one unit to the whole period
Per-unit economics tell you whether a product is priced well, but the bottom line depends on volume. Turn on the quantity option to multiply cost, price and profit by the number of units you expect to sell, giving total revenue, total cost and total gross profit for the period. This is useful for sanity checking a sales target: a thin 8% margin can still produce strong total profit at high volume, while a rich 60% margin on a handful of units may not cover the bills.
Why gross margin is not the whole story
The margin this tool reports is a gross margin: it only subtracts the direct cost of the product from its price. It does not account for overhead such as rent, salaries, marketing, packaging, payment processing, or shipping. After those operating expenses come out, your net profit margin will be meaningfully lower. Use gross margin to compare products and set prices, then track net margin to understand whether the business as a whole is actually making money. To convert a target margin into the markup you need, divide the margin by one minus the margin: a 60% margin requires 0.60 ÷ 0.40 = 150% markup.
Margin and the markup it requires
| Gross margin | Equivalent markup | Health |
|---|---|---|
| 10% | 11.1% | Thin |
| 25% | 33.3% | Moderate |
| 40% | 66.7% | Healthy |
| 50% | 100% | Healthy |
| 60% | 150% | Strong |
Markup needed on cost to reach a given gross margin on price.
Frequently asked questions
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. On a $40 item sold for $100, the margin is 60% but the markup is 150%, both describe the same $60 profit against different bases.
How do I calculate gross profit margin?
Subtract the cost from the selling price to get the profit, divide that profit by the selling price, then multiply by 100. For example, ($100 − $40) ÷ $100 × 100 = 60% gross margin.
How do I find the price for a target margin?
Divide the cost by one minus the margin written as a decimal. To hit a 60% margin on a $40 cost, price = 40 ÷ (1 − 0.60) = $100. Choose the "Cost and target margin %" mode here and the calculator does this for you.
Is a higher margin always better?
A higher margin keeps more of each sale, but pricing too high can reduce sales volume. The best margin balances per-unit profit with how many units you sell, and it must still cover overhead to leave a positive net profit. Use the quantity option to see how margin and volume combine into total profit.