Margin Calculator
Calculate gross profit margin from cost and selling price — or the price you need for a target margin.
Step by step
- Profit: $100 − $60 = $40
- Margin: 40 ÷ 100 = 0.4 → 40%
- Markup: 40 ÷ 60 = 0.6667 → 66.67%
Margin vs. markup
margin = (price − cost) ÷ price × 100 · markup = (price − cost) ÷ cost × 100
Both use the same profit, but margin divides by the price and markup by the cost. A product bought for $60 and sold for $100 has a 40% margin and a 66.7% markup. To hit a target margin, price = cost ÷ (1 − margin): a 40% margin on a $60 cost needs a $100 price. A margin can never reach 100%; a markup can be any size.
More percentage calculators
Frequently asked questions
How do you calculate profit margin?
Subtract cost from price, divide by price and multiply by 100.
What is the difference between margin and markup?
Margin is profit as a share of the selling price; markup is profit as a share of the cost.
What price gives a 30% margin?
Divide the cost by 0.7. A $70 cost needs a $100 price.
Last reviewed November 2026 · Formulas and steps shown with every result.