Margin Calculator
Calculate profit margin and markup from cost and revenue, or find the selling price needed to hit a target margin.
Margin ≠ markup. Margin is profit ÷ revenue; markup is profit ÷ cost. See the FAQ below for why that matters.
Enter your numbers to see profit, margin, and markup.
Gross profit margin
—
—
Breakdown
Selling price
—
Profit
—
Markup
—
How it works
How profit margin is calculated.
- 01
Cost + Revenue → margin and markup
Profit = Revenue − Cost. Gross margin = Profit ÷ Revenue × 100 (profit as a % of the selling price). Markup = Profit ÷ Cost × 100 (profit as a % of the cost). Same profit dollar amount, two different percentages depending on which base you divide by.
- 02
Cost + Target margin → selling price
To hit a target margin, solve for revenue: Selling price = Cost ÷ (1 − Target margin). This is not the same as adding the margin percentage to the cost — that shortcut actually produces a markup, not a margin, and will under-price the item relative to your target.
- 03
Why the distinction matters
Confusing margin and markup is one of the most common pricing mistakes. A 50% markup only produces a 33.3% margin, not a 50% margin. If your target is a specific margin percentage, always divide by (1 − margin), never multiply cost by (1 + margin).
FAQ
Frequently asked questions.
What is the formula for profit margin?
Gross profit margin = (Revenue − Cost) ÷ Revenue × 100. It expresses profit as a percentage of the selling price, not the cost. For example, if you sell an item for $100 that cost $60, your profit is $40 and your margin is $40 ÷ $100 = 40%.
What is the difference between margin and markup?
Margin is profit divided by revenue (selling price); markup is profit divided by cost. The same $40 profit on a $60 cost item is a 40% margin but a 66.7% markup ($40 ÷ $60). Markup is always higher than margin for the same sale because it's measured against a smaller base (cost vs. revenue). Mixing the two up is one of the most common pricing mistakes.
How do I calculate the selling price from cost and desired margin?
Selling price = Cost ÷ (1 − Margin). To hit a 40% margin on a $60 cost item: $60 ÷ (1 − 0.40) = $60 ÷ 0.60 = $100. This is different from just adding 40% to the cost (which would give you a 40% markup, i.e., $84, and only a 28.6% margin) — a common pricing error.
What is a good profit margin?
It varies heavily by industry. Retail typically runs 20–50% gross margin, restaurants 60–70% (on food alone, before labor and rent), software/SaaS 70–90%, and grocery/wholesale distribution as low as 2–5%. Compare your margin to others in your specific industry rather than a general benchmark.
Is profit margin the same as net profit margin?
No. Gross profit margin (what this calculator computes) only subtracts the direct cost of the item or service (COGS) from revenue. Net profit margin subtracts all business expenses — overhead, salaries, rent, taxes, interest — from revenue, and is always lower than gross margin.
Related
Related calculators.
Last updated: July 28, 2026