Margin, markup and price in one tool
Profit margin & markup calculator
Work out profit margin and markup from cost and price, or find the selling price you need for a target margin or markup.
Rates checked October 6, 2026
Results update as you type.
Your saved defaults are loaded.
What do you know?
Pick what you want to work out.
What the item costs you: product, materials or wholesale price.
What you sell it for.
Profit as a share of the selling price.
Profit as a share of cost, in %.
Profit margin
—
Price split
Full breakdown
Every amount for one sale, with its share of the total.
| Item | Amount | Share |
|---|
How to calculate profit margin
Gross profit = selling price − cost
Profit margin = gross profit ÷ selling price × 100
Markup = gross profit ÷ cost × 100
If an item costs $20 and sells for $35, gross profit is $15. The profit margin is $15 ÷ $35 = 42.9%, and the markup is $15 ÷ $20 = 75%. Both numbers describe the same sale; they just divide by different things.
Margin vs markup
Margin is profit as a share of the price. Markup is profit as a share of the cost. Markup is always the bigger number, which is why mixing them up leads to prices that are too low: a seller who wants a 50% margin but adds a 50% markup only gets a 33.3% margin.
| Profit margin | Equals this markup |
|---|---|
| 20% | 25% |
| 30% | 42.9% |
| 40% | 66.7% |
| 50% | 100% |
| 60% | 150% |
Markup = margin ÷ (1 − margin)
Margin = markup ÷ (1 + markup)
How to find a price from a target margin
Divide your cost by 1 minus the margin you want. For a 40% margin on a $20 cost: $20 ÷ 0.6 = $33.33. To use markup instead, multiply cost by 1 plus the markup: a 50% markup on $20 gives $30, which is a 33.3% margin.
Gross margin vs net margin
This calculator works out gross margin: price minus the cost of the item. Online sellers also pay platform fees, shipping, packaging and ads, which come out of that gross profit. To see your net margin after all of them, use the e-commerce profit margin calculator, or work backwards from a net margin with the target price calculator.
Frequently asked questions
How do I calculate profit margin?
Subtract cost from the selling price to get gross profit, then divide gross profit by the selling price and multiply by 100. A $35 item that costs $20 has a 42.9% margin.
How do I calculate markup?
Divide gross profit by cost and multiply by 100. A $35 item that costs $20 has a $15 profit and a 75% markup.
Is a 50% markup the same as a 50% margin?
No. A 50% markup gives a 33.3% margin. To get a 50% margin you need a 100% markup, which means doubling the cost.
What is a good profit margin?
It depends on the industry. For small online shops, many aim for a gross margin of 50% or more, so that a healthy net margin is left after fees, shipping and ads.
How do I work out the selling price from margin?
Divide cost by 1 minus the margin as a decimal. For a 40% margin on a $20 cost, $20 ÷ 0.6 = $33.33.