A little clarity for your next decision
Margin & markup calculator
Understand your margin, markup, and profit after variable costs. Or find a selling price that reaches your target margin.
Your numbers
Example values loaded. Change any number to make it yours.
Formatting only. Changing currency does not convert amounts.
Extra costs & fees (included)
Optional amounts are per unit. This assumes one unit per transaction, so the fixed fee applies once to each unit. Blank fields count as zero.
Your shipping cost after any amount covered by the buyer.
Boxes, labels, and other packaging.
Additional costs attributable to one unit.
Applied to the selling price. Blank means zero.
Assumes one unit per transaction.
Your margin, made clear
Profit after costs
$14.25
Per unit, after product cost, extra costs, and fees.
Gross profit
$20.00
Selling price minus product cost.
Gross margin
40%
Gross profit ÷ selling price.
Markup
66.67%
Gross profit ÷ product cost.
Margin after costs
28.5%
Profit after all entered costs ÷ selling price.
Fees per unit
$1.75
Percentage fee plus fixed transaction fee.
Excludes tax, returns, and any costs you haven’t entered.
Compare pricing scenarios
Save up to 3 snapshots, then change your inputs to compare. Scenarios stay on this page only.
For example: Full price or Summer sale. Up to 40 characters.
Results updated. Profit after costs $14.25.
How the calculation works
Margin uses selling price as its denominator. Markup uses product cost. The same price can have a very different margin and markup.
- Product gross profit = selling price − product cost
- Gross margin = gross profit ÷ selling price × 100
- Markup = gross profit ÷ product cost × 100
- Estimated profit = selling price − product cost − entered per-unit costs − percentage payment fee − fixed payment fee
- Margin after entered costs = estimated profit ÷ selling price × 100
Target price = (product cost + entered per-unit costs + fixed fee) ÷ (1 − target margin ÷ 100 − payment fee percentage ÷ 100)
The target is the margin after entered costs and fees. The price is rounded up to the selected currency’s smallest unit so rounding does not undercut the target. Its denominator must be positive.
We assume one unit per transaction. Percentage fees apply to the selling price. Overhead, taxes, returns, and unentered costs are excluded, so the result is not net profit. Ratios with a zero denominator are shown as unavailable.
A worked example
With a USD 30 product cost and USD 50 selling price, product gross profit is USD 20, gross margin is 40%, and markup is 66.67%.
Add USD 3 shipping, USD 1 packaging, a 2.9% payment fee, and a USD 0.30 fixed fee. Estimated profit becomes USD 14.25 and the margin after entered costs is 28.50%.
For a 30% margin after those costs, the formula gives approximately USD 51.1177. Round up to USD 51.12 as the minimum price at cent precision.
A few common questions
Is a 50% markup the same as a 50% margin?
No. A product that costs 20 and sells for 30 has a 50% markup but a 33.33% gross margin. Markup is divided by cost; margin is divided by selling price.
Why can’t I reach some target margins?
The target margin plus the percentage payment fee must be less than 100%. When there are no costs at all, there is no unique positive price to solve for. The calculator explains these cases instead of showing a misleading price.
How should I handle a fee shared across several units?
This calculator assumes one unit per transaction. For an approximate per-unit comparison, allocate the fixed transaction fee across the typical number of units yourself before entering it. The calculator does not model a multi-item cart.
Are scenarios saved when I leave?
No. Up to three snapshots are held only on this page. They are not stored, sent to a server, or added to the URL. Copy any results you need before leaving or refreshing.
