Profit margin calculator
Choose to calculate the margin of an existing sale or find a price that achieves your target margin. Margin and markup use different bases and are shown separately.
● Your numbers stay in this browser.
(100 − 60) ÷ 100 × 100
From question to answer in three moves.
Choose to calculate a profit margin or find a selling price.
Enter cost and revenue for margin, or cost and the target margin for price.
Review profit, margin, and markup, or the selling price needed for your target.
The calculation is visible, not a black box.
Margin divides profit by revenue; markup divides profit by cost. Zero revenue makes margin undefined; zero cost makes markup undefined. Target price requires positive cost and a margin from 0% up to, but not including, 100%.
Formula usedprofit = revenue − costmargin % = profit ÷ revenue × 100markup % = profit ÷ cost × 100selling price = cost ÷ (1 − margin ÷ 100)
Calculation checks updated 27 September 2026: automated tests cover sample inputs and numeric boundaries, not every possible input or commercial rule.
Math without mystery.
What is profit margin?+
Profit margin is profit divided by revenue, expressed as a percentage. Profit is revenue minus cost.
What is the difference between margin and markup?+
Margin divides profit by revenue. Markup divides profit by cost, so the two percentages are not interchangeable.
Can profit margin be negative?+
Yes. With positive revenue, cost greater than revenue makes both profit and profit margin negative. Negative revenue changes this sign interpretation; a zero revenue makes margin undefined.