Profit Margin Calculator — Margin & Markup
Price it right — margin, markup, and the price that keeps them.
At a glance
- Input:
- Numbers you enter
- Processing:
- Runs locally in your browser
- Privacy:
- Nothing you type is sent to a server
Last updated: 2026-11-12
Common use cases
- Pricing a $40 item at $60 — $20 profit, 33.33% margin, 50% markup.
- Finding the price that keeps a 40% margin on a $40 cost — $66.67.
- Checking what a $60 sale really keeps after $5 fees and $3 shipping — $12 profit, 20% net margin.
- Working out the most you can pay for an item you sell at $60 at 40% margin — $28 after $8 of fees and shipping.
About this tool
Enter a cost and a selling price to see the profit, the margin and the markup — or work backwards: the price that keeps a target margin, the price for a target markup, or the most you can pay for an item at a target margin. $40 cost, $60 price → $20 profit, 33.33% margin (profit ÷ price) and 50% markup (profit ÷ cost). Add per-sale fees and shipping and the margin shown is the margin you actually keep — $5 fees and $3 shipping on that sale leave $12 profit and a 20% net margin. Gross margin on the item alone unless you add fees/shipping — net margin after ads, overheads and tax is always smaller. Estimates for pricing decisions, not financial or tax advice. Nothing is fetched or uploaded: everything runs locally in your browser.
How to use it
- Choose a mode — Margin & markup, Price for a target margin, Price for a target markup, or Maximum cost.
- Enter the cost — $40 in the worked example.
- Enter the selling price — $60 in the example — or the target margin/markup in reverse mode.
- Add per-sale fees and shipping if you pay them — the net line shows the margin you actually keep.
- Read the profit ($20), margin (33.33%) and markup (50%) — or the price / maximum cost in reverse mode.
Worked examples
Input: $40 cost, $60 price
Output: $20 profit · 33.33% margin · 50% markup
$60 − $40 = $20 profit; margin 20 ÷ 60 × 100 = 33.33%; markup 20 ÷ 40 × 100 = 50%.
Input: $40 cost, target margin 40%
Output: Price $66.67
$40 ÷ (1 − 0.40) = $66.67. Fees and shipping are added to the cost first when entered.
Input: $40 cost, $60 price, $5 fees + $3 shipping
Output: $12 net profit · 20% net margin
$60 − $40 − $5 − $3 = $12; net margin 12 ÷ 60 × 100 = 20% — the margin actually kept.
Practical tips
- Margin and markup share the same profit but different bases — quote the margin when you talk about what you keep, the markup when you talk about what you add.
- Enter fees and shipping to see the net margin — the gross margin flatters every sale that carries a marketplace or payment fee.
- A 40% margin needs a 66.67% markup — price = cost ÷ (1 − margin), so small margin rises cost more than they look.
Common mistakes
- Mixing up margin and markup — a 50% markup is a 33.33% margin, not a 50% margin.
- Forgetting fees and shipping — a $60 sale with $8 of fees keeps $12, not $20.
- Treating a per-unit margin as a business benchmark — it is per-unit, pre-tax, before ads and overheads.
How this compares
Most margin calculators show the gross margin only and hide the formula, or they bury the fee question in a marketplace table that goes stale. This tool shows profit, margin and markup together, counts generic fees and shipping so the net margin is the margin you actually keep, and works backwards to the price or the maximum cost — all locally, with the formulas on the page. The tradeoff: it is per-unit and pre-tax — ads, overheads and tax always shrink the real margin further.
Good to know
- Gross margin on the item alone unless you add fees/shipping — net margin after ads, overheads and tax is always smaller.
- Per-unit, pre-tax — never a margin figure for a whole business.
- Fees and shipping are generic fields you enter — there is no maintained fee table per marketplace.
- Estimates for pricing decisions, not financial or tax advice.
- Margin can never reach 100% — it is profit as a share of the selling price, so a zero cost would be needed.
Frequently asked questions
What is the difference between margin and markup?
Margin = profit ÷ price (the share of the selling price you keep); markup = profit ÷ cost (how much you add on top of cost). $40 cost, $60 price → 33.33% margin and 50% markup. Same profit, different base.
How do I price for a target margin?
Price = cost ÷ (1 − margin). $40 cost at 40% margin → $40 ÷ 0.60 = $66.67. Fees and shipping you enter are added to the cost first, so the margin shown is the margin you actually keep.
What are fees and shipping for?
Per-sale costs you pay — a marketplace fee, a payment fee, postage. They lower the margin you keep: $40 cost, $60 price, $5 fees + $3 shipping → $12 net profit and a 20% net margin instead of 33.33%.
What is the maximum cost for a target margin?
The most you can pay and still keep the margin: max cost = price × (1 − margin) − fees − shipping. $60 price at 40% margin with $5 fees and $3 shipping → $28.
Can margin be over 100%?
No. Margin is profit as a share of the selling price, so it can never reach 100% — that would need a zero cost. Markup can exceed 100%: a 200% markup means the price is 3× the cost.
Is this gross or net margin?
Gross margin on the item alone unless you add fees/shipping — then the net line shows the margin after them. Net margin after ads, overheads and tax is always smaller.
Is my data uploaded?
No. Everything runs locally in your browser — nothing is fetched, sent or stored.

