Cost & Profit Margin Calculator
Total cost, unit cost, profit, margin and markup — plus the price you need for a target margin.
Cost & Profit Margin Calculator works out the five numbers every seller needs before setting a price: total cost, all-in cost per unit, profit, gross margin % and markup %. Extra costs go in as named rows — add as many as your situation needs — so the unit cost reflects everything you actually pay, not just the sticker price of the item.
Importing from China? Calculate full landed cost with duties & fees →
Related tools: Percentage Calculator · Discount Calculator · Sales Tax Calculator
How to use
- Enter the unit cost and quantity, then add any other costs as rows — shipping, packaging, fees — each with its own name and amount.
- Optionally enter your selling price per unit to see profit per unit, total profit, gross margin % and markup %.
- Or work backwards: enter a target gross margin % and the calculator shows the selling price you need. Everything updates as you type.
About this tool
Margin and markup are the pair everyone mixes up. Margin is profit as a share of the selling price; markup is profit as a share of the cost. The same profit is always a bigger markup than margin — a 50% markup is only a 33.3% margin — and pricing with one when you meant the other quietly shrinks your profit.
The currency selector only changes the symbol shown; no conversion happens. Everything is calculated in your browser — no figures are uploaded or stored.
How it works
Gross margin % = (selling price − all-in unit cost) ÷ selling price × 100. Markup % = (selling price − all-in unit cost) ÷ all-in unit cost × 100. Same profit, two different denominators — which is why markup always reads higher than margin for the same deal.
The all-in unit cost is the honest base for both: (unit cost × quantity + every extra cost row) ÷ quantity. Worked example: 100 units at $8, plus $150 shipping and $50 packaging, gives a total cost of $1,000 and an all-in unit cost of $10 — not $8.
Reverse pricing inverts the margin formula: price = all-in unit cost ÷ (1 − target margin ÷ 100). At a $10 unit cost, a 40% margin target needs a $16.67 price; a 50% target needs $20. Note the asymmetry — each extra point of margin costs more price than the last.
Worked examples
Marketplace seller sanity check: You sell a gadget at $24.99. Unit cost $9, quantity 200, extra rows: freight $260, packaging $80, marketplace fees $340. All-in unit cost is $12.40, profit $12.59 per unit — a 50.4% margin, not the 64% the sticker cost alone suggested.
Pricing from a margin target: A handmade item costs $14 all-in per unit. For a 60% gross margin, the suggested price is $14 ÷ 0.4 = $35. If the market will only bear $29, the margin at that price is 51.7% — decide with the real number in front of you.
Quick reference
| Margin | Equivalent markup |
|---|---|
| 10% | 11.1% |
| 20% | 25% |
| 25% | 33.3% |
| 33.3% | 50% |
| 40% | 66.7% |
| 50% | 100% |
Frequently asked questions
What is the difference between margin and markup?
Margin divides profit by the selling price; markup divides profit by the cost. A $10 profit on a $40 cost sold at $50 is a 25% markup but a 20% margin. Retail and accounting usually talk margin; trades often quote markup.
Which costs should I put in the extra rows?
Anything you pay per batch or per order: shipping, packaging, payment or marketplace fees, storage. They are added to the total and spread across the quantity, so the all-in unit cost stays honest.
How does the suggested price work?
Selling price = all-in unit cost ÷ (1 − target margin). For a 40% margin target, divide your unit cost by 0.6. The result guarantees that margin before any costs you did not enter.
Is my data uploaded anywhere?
No. All calculations run in your browser with JavaScript; nothing you type leaves your device.
More free tools
Percentage Calculator
Work out percentages, increases and discounts in one click.
Age Calculator
Find your exact age in years, months and days.
BMI Calculator
Check your Body Mass Index in seconds.
Tip Calculator
Split the bill and work out the tip in seconds.
Discount Calculator
See the sale price and how much you save, instantly.
Unit Converter
Convert length, weight and temperature instantly.