Margin Calculator
Free margin calculator: find profit margin, markup and gross profit from cost and selling price.
Input
Formula & explanation
Profit margin is the share of your selling price that stays as profit once you subtract the cost. Markup measures the same profit against the cost instead, so for any sale the markup percentage is always higher than the margin. Mixing the two is the single most common pricing mistake — a product sold at a "50% markup" earns only a 33.3% margin.
Worked example. You buy an item for $60 and sell it for $100. Profit is $100 − $60 = $40. Margin = 40 / 100 = 40%. Markup = 40 / 60 = 66.7%. Same $40 profit, two different percentages depending on the base.
Reverse example. To hit a target margin, divide cost by (1 − margin). For a 40% margin on a $60 cost: $60 / (1 − 0.40) = $100 selling price. The calculator works both ways — from price or from a target margin.
Common mistakes. (1) Quoting markup to a client but budgeting as if it were margin — you fall short of your profit target. (2) Forgetting margin turns negative when cost exceeds price (a loss). (3) Confusing gross margin, shown here, with net margin, which also subtracts overhead, salaries and taxes.
Who uses it. Retailers and e-commerce sellers setting shelf prices, freelancers quoting projects, resellers checking a discount still leaves a healthy margin. Everything runs in your browser — nothing leaves your device.
Example
Frequently asked questions
What is profit margin?
The share of revenue that remains as profit after subtracting the cost. Sell for $100 at a $60 cost and the $40 profit is a 40% margin.
What is the difference between profit margin and markup?
Margin uses the selling price as the base; markup uses the cost. A 50% markup equals a 33.3% margin, and a 40% margin equals a 66.7% markup — same profit, different base.
How do I set a price to hit a target margin?
Divide the cost by (1 − target margin). For a 30% margin on a $70 cost: 70 / (1 − 0.30) = $100. The calculator can start from the margin instead of the price.
Can the margin be negative?
Yes. If the cost is higher than the selling price you are selling at a loss, and the margin comes out negative — a useful warning when testing aggressive discounts.
Is this gross margin or net margin?
Gross margin: selling price minus the direct product cost only. Net margin also subtracts operating expenses, salaries and taxes, so it is always lower. Use this for per-product pricing.
Why does the same profit show a higher markup than margin?
Markup divides profit by the smaller number (cost); margin divides by the larger number (price). The dollar profit is identical, only the base changes.
Does it work with any currency?
Yes. The math is purely proportional — enter cost and price in dollars, euros or pesos and the margin and markup percentages are the same.