What to enter
Choose the calculation that matches what you know:
- Gross margin: cost and selling price.
- Price for a target margin: positive cost and a target percentage of selling price.
- Price for a target markup: positive cost and a target percentage of cost.
- Maximum cost for a target margin: positive selling price and the margin you want to keep.
- Advanced costs: known cost and selling price, plus shipping, other costs, a fixed fee and a percentage fee.
Enter cost and price per item in the same currency. The calculator does not convert currencies or choose a currency for you. It uses amounts with two decimal places; currencies that need a different minor-unit precision are outside this version.
Include the costs you want this item calculation to cover. Shipping, payment fees, returns, tax and overhead are not added automatically. The result is gross profit per item, not net business profit, a tax calculation or a recommendation about a suitable margin.
Method and examples
- Gross profit =
selling price − cost. - Gross margin =
gross profit ÷ selling price × 100%. - Markup =
gross profit ÷ cost × 100%. - Target selling price =
cost ÷ (1 − target margin ÷ 100).
For a cost of 80 and selling price of 100, gross profit is 20, gross margin is 20%, and markup is 25%. Margin uses the selling price as its base; markup uses cost. They are different percentages of the same profit.
For a cost of 80 and a target margin of 20%, the required price is 100. If that item sells for 60 instead, gross profit is −20, margin is about −33.333333%, and markup is −25%. Losses remain negative.
A zero selling price makes margin undefined because its denominator is zero. A zero cost with a positive selling price gives 100% margin and undefined markup. If cost and price are both zero, gross profit is zero and both percentages are undefined.
Target rounding and limits
Costs and selling prices must be from 0 to 1 trillion, with up to two decimal places. Use a decimal point, without commas, currency symbols or scientific notation. The target margin accepts up to six decimal places, must be at least zero and must be below 100%. In target mode cost must be positive, and the resulting price must also fit the 1 trillion limit.
The target price rounds upward to two decimal places, so the rounded price reaches at least the requested margin. These decimal places represent cents for a currency with 100 cents per unit. For cost 1 and target margin 33%, the unrounded price is about 1.492537. The price rounds up to 1.50, achieving about 33.333333% margin. Rounding down to 1.49 would fall short.
Calculations use exact integer cents and scaled percentages for monetary results; percentage displays use decimal arithmetic. The displayed and copied margin and markup use up to six decimal places. The achieved margin is calculated from the rounded selling price, so its displayed percentage can be rounded even though the price was selected to reach the target.
Price from markup and maximum cost
Price from markup = cost × (1 + markup ÷ 100), rounded upward to cents. Cost 80 with target markup 25% gives price 100, profit 20 and margin 20%.
Maximum cost = selling price × (1 − target margin ÷ 100), rounded downward to cents. Price 100 with target margin 20% gives maximum cost 80. Price 0.05 with target margin 25% gives maximum cost 0.03, achieving 40% margin. A cost of 0.04 would achieve only 20% and fall short.
Target markup accepts 0–1,000,000%, up to six decimal places. Maximum-cost margin accepts 0–100% inclusive. At 100% the maximum cost is zero and markup is undefined. Target-price modes require positive cost and a final price no higher than 1 trillion. The displayed achieved percentages use the rounded money amounts and may themselves round to six decimal places.
Shipping, other costs and fees
Advanced costs uses amounts per item in the same currency. Cost and selling price are required; blank optional fields mean zero. Enter your own fee rate, from 0% to 100%, with up to six decimal places. No provider tariffs are preset.
- Percentage fee =
selling price × fee percentage ÷ 100, rounded half up to cents once. - Total costs =
cost + shipping + other costs + fixed fee + rounded percentage fee. - Profit after entered costs =
selling price − total costs. - Contribution margin =
profit after entered costs ÷ selling price × 100%.
For price 100, cost 60, shipping 10, percentage fee 3% and fixed fee 1, the percentage fee is 3, total costs are 74, profit is 26 and contribution margin is 26%. A price of 0.05 with a 10% fee gives an unrounded fee of 0.005, rounded to 0.01. All shown cost rows add up to the shown total. With four entered cost rows and the percentage fee, total costs can reach 5 trillion.
A zero selling price gives undefined contribution margin; a loss stays negative. This item contribution margin is not company net margin. Include tax, returns, overhead or customer acquisition costs only when you have amounts to enter, and avoid counting the same cost twice. Fees use the full entered selling price. Advanced costs do not apply to the other modes, and this calculator does not solve target prices with fees.