Ask a room of business owners their margin and half will quote their markup instead — and the difference is not pedantry, it is money. Margin and markup describe the same profit measured against two different bases, and pricing with the wrong one quietly gives away a fifth or more of the intended profit. This calculator settles it in one step: enter what something costs and what it sells for, and you get the gross profit in dollars plus both percentages, side by side. It works for a single product, a quote for a job, or a whole period of trading — anywhere a cost and a revenue belong to the same thing.
The margin and markup formulas
Both percentages start from the same profit:
Profit = revenue − cost
Margin = profit ÷ revenue × 100 · Markup = profit ÷ cost × 100
Margin answers the question "of every dollar that comes in, how much is profit?" — which is why accountants, investors and buyers of businesses always talk in margins. Markup answers "how much did I add on top of what it cost me?" — the natural way to think when setting a price from a supplier's invoice. Because revenue is always larger than cost when there is a profit at all, the same profit is a smaller percentage of revenue than of cost: margin is always the lower number, and it can never reach 100%, while markup has no ceiling. The two are linked by a fixed relationship — margin = markup ÷ (1 + markup) — so a 100% markup is a 50% margin, a 50% markup is a 33.33% margin, and a 25% markup is a 20% margin.
Worked example
An item costs $60 and sells for $100. The gross profit is $100 − $60 = $40. The margin is $40 ÷ $100 = 40%: forty cents of every dollar of sales is gross profit. The markup is $40 ÷ $60 = 66.67%: the price sits two-thirds above the cost. Both statements describe the identical transaction — which is exactly why the confusion is dangerous. A seller who wants a 40% margin but prices by adding a 40% markup charges $84 instead of $100, and discovers at year-end that the "40%" business actually ran at a 28.57% margin. Now scale the example up: a product line costing $850 and selling for $1,275 makes $425 of profit — a 33.33% margin and a 50% markup. The percentages moved; the discipline of checking both did not.
Markup to margin conversion table
| If you mark up by… | Your margin is… |
|---|---|
| 10% | 9.09% |
| 20% | 16.67% |
| 25% | 20.00% |
| 50% | 33.33% |
| 100% | 50.00% |
Keep that table in mind when a supplier, a partner or your own habits quote markups while your accounts are kept in margins. To price directly from a target margin, reverse the formula: price = cost ÷ (1 − margin). For a 40% margin on a $60 cost, that is $60 ÷ 0.60 = $100 — the worked example above, priced correctly from the start. And remember what this calculator's margin is: a gross margin, measured before rent, wages, marketing, interest and tax. Those overheads are real, and they are paid out of the gross profit this page calculates. A healthy gross margin is what makes a net profit possible; it is not the net profit itself. Knowing both numbers — and never mistaking one for the other, or margin for markup — is most of what pricing competence consists of. It is also worth reviewing margins both ways: a business-wide figure can look perfectly comfortable while individual products quietly lose money, subsidised by the strong sellers around them. Running this calculation product by product, rather than once for the whole business, is usually where the surprises — and the easiest pricing improvements — are hiding.
Frequently asked questions
How is profit margin calculated?
Subtract the cost from the revenue to get the gross profit, then divide the profit by the revenue and multiply by 100. If something costs $60 and sells for $100, the profit is $40 and the margin is $40 ÷ $100 × 100 = 40%. Margin is always measured against the selling price, never against the cost.
What is the difference between margin and markup?
They describe the same profit from two directions. Margin is profit as a percentage of the selling price (revenue); markup is profit as a percentage of the cost. A $40 profit on a $100 sale is a 40% margin, but a 66.67% markup, because the cost was $60. Markup is always the larger number — confusing the two is a classic pricing mistake.
How do I set a price for a target margin?
Divide the cost by (1 − target margin). For a 40% margin on something that costs $60: $60 ÷ (1 − 0.40) = $60 ÷ 0.60 = $100. Notice that adding 40% to the cost instead — the markup method — would price it at $84 and deliver only a 28.57% margin. The two methods genuinely give different prices.
Can profit margin be more than 100%?
No. Profit is a part of the revenue, so margin tops out below 100% — it only approaches 100% as the cost approaches zero. Markup is different: it is measured against cost, so it can exceed 100% easily. A product bought for $10 and sold for $30 has a 200% markup but a 66.67% margin.
What is a good profit margin?
It varies enormously by industry. Grocery and high-volume retail often run on gross margins of 20–30% or less, restaurants around 30–50% on menu items before overheads, and software or services can exceed 70%. Judge a margin against businesses doing the same thing, and remember that gross margin is before rent, wages, tax and every other overhead — net margin is the figure that decides whether a business truly profits.
What is the difference between gross margin and net margin?
Gross margin — what this calculator works out — counts only the direct cost of the item or job against its revenue. Net margin deducts everything else as well: rent, staff, marketing, interest and tax. A business can show a healthy 40% gross margin and a 3% net margin once overheads are paid, which is why both figures matter.
What does a negative margin mean?
The cost is higher than the revenue — the item or job loses money before overheads are even considered. Occasional negative margins can be deliberate, such as a loss-leader product that brings in customers who buy profitable items too, but as a pattern it means prices must rise or costs must fall.
Should cost include shipping, fees and packaging?
For a margin you can trust, yes — include every cost that exists because the item was sold: the purchase or production cost, packaging, shipping you pay, and marketplace or card fees. A margin calculated on the bare product cost alone flatters the business and hides where the money actually goes.
Is this profit margin calculator free and private?
Yes. It is free with no sign-up, and the calculation runs entirely in your browser — the figures you enter never leave your device.