Profit Margin Calculator
Profit margin is the share of revenue you keep after covering the cost of what you sold. Enter your revenue (the selling price) and your cost, and this free calculator instantly shows your gross profit, your gross margin as a percentage, and the markup you applied — three numbers business owners mix up all the time.
What is profit margin?
Profit margin is profit expressed as a percentage of revenue. It answers a single question: of every dollar you take in, how much do you keep? A 40% gross margin means that for every $100 of sales, $40 is left after the direct cost of the goods or services sold; the other $60 went to producing or buying them.
This calculator focuses on gross margin — revenue minus the direct cost of what you sold (COGS). It does not subtract rent, salaries or marketing; those come out at the net-margin stage.
Profit margin formula
The three figures come from the same two inputs:
Gross profit = revenue − cost
Gross margin (%) = (revenue − cost) ÷ revenue × 100
Markup (%) = (revenue − cost) ÷ cost × 100
Margin and markup are not the same thing, which is the most common pricing mistake. Margin is measured against the selling price; markup is measured against the cost.
Margin vs markup — why they differ
Buy something for $60 and sell it for $100. Your gross profit is $40. As a margin that is 40% (40 ÷ 100). As a markup it is 67% (40 ÷ 60). Same profit, two very different percentages. If a supplier tells you "we add a 50% markup" and you assume that means a 50% margin, you will under-price every item. Always confirm which one is meant.
A worked example
A workshop sells a service for $100 that costs $60 in labour and materials.
- Gross profit: $100 − $60 = $40
- Gross margin: $40 ÷ $100 = 40%
- Markup: $40 ÷ $60 ≈ 67%
If they wanted a 50% margin instead, they would need to sell at $120 ($60 ÷ (1 − 0.50)), not $90.
What is a good profit margin?
It depends heavily on the industry. Retail and grocery run on thin gross margins (often 20–40%) because volume is high; software and digital products can exceed 80% because the cost to deliver one more unit is tiny. As a rough guide, a gross margin below ~20% leaves little room to cover overheads, while consistently high margins may signal pricing power — or an opportunity for competitors. Compare against businesses like yours, not a universal number.
Frequently asked questions
Is the profit margin calculator free?
Yes, it is completely free and needs no sign-up. The calculation runs in your browser and nothing you enter is stored or sent anywhere.
What is the difference between margin and markup?
Margin is profit divided by the selling price; markup is profit divided by the cost. The same $40 profit on a $100 sale that cost $60 is a 40% margin but a 67% markup. They are easy to confuse and the mistake leads to under-pricing.
Does this show gross or net margin?
Gross margin. It subtracts only the direct cost of goods or services sold. Net margin also subtracts overheads like rent, salaries, marketing and taxes, which this calculator does not include.
How do I price for a target margin?
Divide your cost by (1 minus the target margin as a decimal). For a 50% margin on a $60 cost: $60 ÷ (1 − 0.50) = $120 selling price.
Can profit margin be negative?
Yes. If your cost is higher than your revenue, gross profit and margin are negative — you are losing money on each sale before overheads are even counted.
This tool was built by our AI. Yours could be next.
We design and ship custom calculators, automations and AI agents for businesses — to production.
Talk to us →