Margin calculator
Calculate profit margin, markup, profit and the selling price required to reach a target margin. See the relationship visually as you change the numbers.
Revenue composition
See exactly how much of each sale is cost and gross profit.Margin ↔ markup curve
The same profit produces different percentages because the denominator changes.Profit sensitivity to selling price
Cost stays fixed while revenue changes around your current price.Target margin → required price
As the target approaches 100%, the required selling price rises rapidly.Read the calculation, not just the percentage.
| Metric | Current value | What it means |
|---|---|---|
| Margin | 25.0% | Profit as a share of revenue |
| Markup | 33.3% | Profit as a share of cost |
| Cost share | 75.0% | Portion of revenue consumed by cost |
| Profit / sale | $25.00 | Gross profit in the current scenario |
Price for a target margin
Cost allowed at a target margin
Profit margin inputs
What is profit margin?
Profit margin tells you what percentage of the selling price remains as profit after the relevant cost is deducted. It is one of the simplest ways to connect a sale price with the money left after cost.
The cost of the goods, materials or service delivery.
The amount received from the sale, also called selling price.
Revenue minus cost: P = R − C.
Profit divided by revenue: M = P/R.
For a $75 cost and $100 selling price: profit = $25, margin = 25%, markup = 33.33%.
Margin, profit, markup and target-price formulas
Once the relationship between cost, revenue and profit is clear, the main formulas can be rearranged to solve for any missing quantity.
- C
- cost
- R
- revenue / selling price
- P
- gross profit
- m
- margin as a decimal, e.g. 25% = 0.25
| Quantity | Formula | What it answers |
|---|---|---|
| Profit | P = R − C | How many currency units remain after cost? |
| Margin | M = P / R | What percentage of the selling price is profit? |
| Markup | U = P / C | How large is profit compared with cost? |
| Target price | R = C / (1 − M) | What price produces a chosen margin? |
Why target price is not simply cost plus the target percentage
Suppose the cost is $75 and the target margin is 25%. The mistake is to add 25% to cost and call the result a 25% margin. That gives $93.75, but the profit would be $18.75 and the margin would be only 20%.
Price = Cost ÷ 0.75 = $100
Worked margin examples
Use the examples as mental models: identify the denominator before you calculate the percentage.
Example 1 · Cost $75, selling price $100
Profit = $100 − $75 = $25.
Margin = $25 ÷ $100 × 100 = 25%.
Markup = $25 ÷ $75 × 100 ≈ 33.33%.
Example 2 · Pricing for a 40% margin
Cost = $60 and target margin = 40% = 0.40.
Price = $60 ÷ (1 − 0.40) = $100.
Profit = $40, so $40 ÷ $100 = 40% margin.
Example 3 · 50% markup is not 50% margin
Cost = $100 and markup = 50%, so profit = $50 and revenue = $150.
Margin = $50 ÷ $150 = 33.33%.
| Cost | Selling price | Profit | Margin | Markup |
|---|---|---|---|---|
| $50 | $100 | $50 | 50% | 100% |
| $75 | $100 | $25 | 25% | 33.33% |
| $100 | $150 | $50 | 33.33% | 50% |
| $120 | $150 | $30 | 20% | 25% |
Margin vs. markup: the denominator changes
Margin and markup are related, but they answer different questions. The relationship can be converted mathematically in either direction.
| Metric | Denominator | Formula | Interpretation |
|---|---|---|---|
| Margin | Revenue | Profit / Revenue | Profit share of the selling price. |
| Markup | Cost | Profit / Cost | Profit added relative to the cost base. |
| Profit | None | Revenue − Cost | Currency amount left after cost. |
markup = m ÷ (1 − m)
margin = u ÷ (1 + u)
cost as a share of revenue
| Margin | Equivalent markup | Cost share |
|---|---|---|
| 10% | 11.11% | 90% |
| 20% | 25% | 80% |
| 25% | 33.33% | 75% |
| 40% | 66.67% | 60% |
| 50% | 100% | 50% |
| 75% | 300% | 25% |
How target margin changes the required selling price
The target-margin curve becomes steep as the target approaches 100%, because the cost must occupy a smaller and smaller share of the final price.
| Cost | Target margin | Required price | Profit | Markup |
|---|---|---|---|---|
| $100 | 20% | $125 | $25 | 25% |
| $100 | 25% | $133.33 | $33.33 | 33.33% |
| $100 | 40% | $166.67 | $66.67 | 66.67% |
| $100 | 50% | $200 | $100 | 100% |
| $100 | 75% | $400 | $300 | 300% |
Where margin analysis is useful
Margin calculations appear in retail, wholesale, manufacturing, services and e-commerce because the same cost–revenue–profit relationship can be applied at unit or aggregate level.
| Situation | Question | Useful calculation |
|---|---|---|
| Retail | What price gives the desired gross margin? | Price = Cost / (1 − Margin) |
| Wholesale | How does a channel discount affect margin? | Margin = Profit / Revenue |
| Services | How much of billed revenue remains after delivery cost? | Profit = Revenue − Cost |
| E-commerce | What happens when fulfillment or transaction costs rise? | Recalculate C and M |
For a simple gross-margin model, the cost should include the costs that your chosen definition of gross profit is intended to capture. If you need operating or net profitability, additional expense categories must be included rather than hidden inside a gross-margin figure.