A profit margin calculator turns a cost and a selling price into profit and margin: margin = (price − cost) ÷ price × 100. For example, an item that costs $40 and sells for $100 makes $60 profit, a 60% margin.
On this page

How to use the profit margin calculator
- Enter the cost per unit, such as product or landed cost.
- Enter the selling price on the same tax basis.
- Read the margin percent and the profit.
The profit margin calculator shows margin on price, not markup on cost. The selling price must be above zero.
What is the profit margin formula?
Profit margin = (selling price − cost) ÷ selling price × 100
Profit = selling price − cost. The margin is profit as a share of the selling price, so it can never reach 100% unless the cost is zero. With a cost of 40 and a price of 100, profit is 60 and the margin is 60%.
Profit margin calculator worked examples
| Cost | Selling price | Profit | Margin | Markup |
|---|---|---|---|---|
| $40.00 | $100.00 | $60.00 | 60% | 150% |
| $70.00 | $100.00 | $30.00 | 30% | 42.86% |
| $75.00 | $100.00 | $25.00 | 25% | 33.33% |
| $50.00 | $80.00 | $30.00 | 37.5% | 60% |
| $12.00 | $20.00 | $8.00 | 40% | 66.67% |
Price for a target margin
To hit a target margin, divide the cost by (1 − margin): price = cost ÷ (1 − margin ÷ 100). A product costing $30 needs a price of $30 ÷ 0.70 ≈ $42.86 for a 30% margin, and $30 ÷ 0.30 = $100 for a 70% margin. Adding 30% to cost ($39) gives only a 23.1% margin.
Margin vs markup
Markup divides profit by cost; margin divides it by price. The same sale always shows a higher markup than margin:
| Margin | Equivalent markup |
|---|---|
| 10% | 11.11% |
| 20% | 25% |
| 25% | 33.33% |
| 30% | 42.86% |
| 40% | 66.67% |
| 50% | 100% |
| 60% | 150% |
Markup = margin ÷ (1 − margin), and margin = markup ÷ (1 + markup). Confusing the two is a common reason for underpricing.
How discounts shrink margin
A discount comes straight out of profit. An item that costs $60 and sells for $100 has a 40% margin; at 10% off, the price is $90, profit falls to $30 and the margin drops to 33.3%. At 25% off, the price is $75 and the margin is 20%. To keep the same dollar profit after a discount, you must sell more units: 30 full-price sales earn $1,200, but at 10% off each sale makes $30 instead of $40, so you need 40 sales, a third more, to earn the same amount.
Gross, operating and net margin
- Gross margin uses the cost of goods sold. The IRS describes gross profit as receipts minus the cost of goods sold, which is what the profit margin calculator measures when you enter product cost.
- Operating margin also subtracts operating expenses such as rent, payroll and marketing.
- Net margin subtracts everything, including interest and taxes, then divides by revenue.
Use prices and costs on the same tax basis: both before sales tax or VAT, or both including it. In Excel, margin is =(B1-A1)/B1 with cost in A1 and price in B1, formatted as a percent.
Business math for education only, not accounting or tax advice.
Setting a price from a target margin
The most useful job for a profit margin calculator is often working backwards from the margin you want. The rule is price = cost ÷ (1 − margin). If a product costs $40 to make or buy and you want a 40% margin, the price is $40 ÷ 0.60 = $66.67. Adding 40% to cost instead gives $56, which is a 28.6% margin, well short of the target.
The gap between margin and markup grows as the percentage rises:
- 20% margin needs a 25% markup.
- 33.3% margin needs a 50% markup.
- 50% margin needs a 100% markup.
Two checks before you settle on a price. First, include every cost that varies with each sale, such as packaging, card fees and shipping you pay for. Enter the fee in the profit margin calculator as part of cost: a 3% payment fee on a $66.67 sale is $2, which takes the margin from 40% to 37%. Second, compare the price with what customers pay elsewhere. A profit margin calculator tells you what you need to charge; the market tells you what you can charge.
Related converters and calculators
Related tools:
- Margin calculator: margin and markup
- Break-even calculator: units to cover fixed costs
- ROI calculator: return on investment
- Discount calculator: sale prices
- GST calculator: tax on prices
Sources
IRS Publication 334: Tax Guide for Small Business (gross profit); U.S. SBA: Manage your finances.
Questions about this calculator
How do you calculate profit margin?
Subtract cost from the selling price, divide that profit by the selling price, and multiply by 100. A $100 sale that cost $70 has a 30% profit margin.
What is a 30% margin on $100?
Profit is $30 and cost is $70.
How do I price for a 70% profit margin?
Divide cost by 0.30. A $30 cost needs a $100 price.
What is the difference between margin and markup?
Margin divides profit by price; markup divides profit by cost. A 50% margin is a 100% markup.
Is this gross or net margin?
Gross, if you enter product cost only. Net margin also subtracts operating costs, interest and taxes.
Check the assumptions and units before relying on a result. Financial, tax and health estimates do not replace advice for your individual circumstances.
Report a calculation issue