Margin Calculator
Find gross margin, profit, and selling price.
Details
Selling price
$66.67
40% margin · 66.7% markup
This works out your profit margin from a cost and a selling price, or tells you what to charge to hit a margin you are aiming for.
It returns the margin, the gross profit in money, and the equivalent markup, so you can see both numbers side by side rather than mixing them up.
What profit margin means
Profit margin is the share of your selling price that is profit. Sell something for $100 that cost you $60 and the $40 profit is a 40% margin.
The word margin is also used for something entirely different in stock trading, where it means borrowing from a broker. This page is about profit margin: the pricing figure a business uses.
The critical thing is what you divide by. Margin divides profit by the selling price. Markup divides the same profit by the cost. Same $40, two very different percentages, and mixing them up is how businesses underprice themselves.
Margin can never reach 100%, because profit is only ever part of the price. Markup has no upper limit at all. If a percentage is above 100, it must be a markup.
What to enter
- Cost
- What the item costs you: the wholesale price, or the materials and labour to make it.
- Selling price
- What you charge the customer, before sales tax.
- Target margin
- Use this to work backwards. Enter the margin you want and it tells you the price to charge.
The three margins a business tracks
- Gross margin
- Revenue minus the direct cost of what you sold, as a share of revenue. What this calculator works out, and the one used for pricing decisions.
- Operating margin
- After rent, wages, marketing and other running costs. Shows whether the business itself works, not just the product.
- Net margin
- After absolutely everything, including tax and interest. The bottom line, and always the smallest of the three.
- Markup
- Not a margin at all. It is profit measured against cost, and it is what you apply to set a price. See the markup calculator.
What this assumes
Cost means the direct cost of the item. Overheads like rent and salaries belong to operating margin, not gross margin.
Prices exclude sales tax, which is collected on behalf of the government and was never your revenue.
How to calculate profit margin
Find the profit, then divide by the selling price. The order matters more than the arithmetic.
- selling price − cost
- The gross profit
- ÷ selling price
- What makes it a margin rather than a markup
Work out the profit. Selling price minus cost. On a $100 sale costing $60, that is $40.
Divide by the selling price. $40 ÷ $100 = 0.4.
Multiply by 100. That gives 40%. Dividing by the cost instead would have given 66.7%, which is the markup.
To hit a target margin, divide. Price = cost ÷ (1 − margin). For a 50% margin on a $60 cost, that is 60 ÷ 0.5 = $120.
See a worked example: why a 50% markup does not give a 50% margin
- Cost
- $60
- Markup applied
- 50%
A 50% markup means adding half the cost: $60 + $30 = $90.
The profit is $30 and the selling price is $90.
Margin: $30 ÷ $90 = 33.3%, not 50%.
To actually earn a 50% margin, divide instead: $60 ÷ 0.5 = $120. That is a 100% markup.
A 50% markup gives only a 33.3% margin
Frequently asked questions
Both measure the same profit, against different things. Margin divides profit by the selling price. Markup divides it by the cost.
On a $60 item sold for $100, the margin is 40% and the markup is 66.7%. The profit is $40 either way; only the comparison changes.
Markup is what you apply when setting a price. Margin is what you report when measuring performance.
It varies enormously by industry, so a single number is meaningless. Grocery retail runs on very thin gross margins and makes it up on volume; software can exceed 80%.
The useful comparison is against others in your own sector, and against your own trend over time. A margin falling quarter on quarter matters more than whether it is above some general benchmark.
No. Profit is part of the selling price, so it can never exceed the whole. A margin approaching 100% would mean the item cost you nothing.
Markup can exceed 100% easily, and often does. So any figure above 100% is a markup, no matter what it is labelled.
Divide the cost by (1 minus the margin as a decimal). For a 40% margin on a $60 cost: 60 ÷ 0.6 = $100.
The mistake is multiplying instead. Adding 40% to $60 gives $84, which is only a 28.6% margin.
No. Sales tax is collected on behalf of the government and passes straight through, so it was never your revenue.
Use the price before tax on both sides. Including it inflates your apparent margin and hides the real one.
Problems people actually run into
Applying a markup and reporting it as a margin
A shop wanting a 40% margin adds 40% to cost and believes the job is done. On a $60 item that gives $84 and a margin of only 28.6%, a shortfall of more than eleven points.
Repeated across a whole catalogue, that gap is the difference between a business that works and one that does not. The fix is a single habit: divide by (1 − margin) rather than multiplying by (1 + margin).
Discounting without checking what it does to margin
A 20% discount does not cost you 20% of your profit; it costs far more, because it comes entirely out of the margin.
On a $100 item with a 40% margin, discounting to $80 leaves $20 profit instead of $40. The price fell by a fifth and the profit halved.
Results are estimates for general information only and are not professional financial, medical, or legal advice. Read our full disclaimer.
Last updated: September 3, 2026