Selling price calculator
Enter your unit cost, per-unit costs, percentage selling fees and the margin you want: the calculator finds the price at which exactly that margin is left after every cost. Fees charged as a percentage of the price are built into the formula instead of being added on top.
How it is calculated
How to calculate selling price from cost and margin
Margin is profit as a share of the price. If no cost depends on the price, price = total unit cost ÷ (1 − margin). A $12 cost and a 20% margin give 12 ÷ 0.8 = $15.
Why percentage fees can’t simply be added on top
Commissions and payment fees are charged as a percentage of the selling price – the very number you are trying to find. Pricing first and adding the fee afterwards misses the margin. With f = fee rate and m = margin:
profit = price − cost − shipping − packaging − f × price = m × price
price = (cost + shipping + packaging) ÷ (1 − m − f)
This only works while margin plus fee rate stay below 100%.
Example with the default values
| Item | Amount |
|---|---|
| Price: 28.50 ÷ (1 − 0.25 − 0.12) | $45.24 |
| − Product cost | −$24.00 |
| − Shipping and packaging | −$4.50 |
| − 12% selling fee | −$5.43 |
| = Profit (25% of $45.24) | $11.31 |
The naive way – 28.50 ÷ 0.75 = $38.00 – leaves $38.00 − $28.50 − $4.56 fee = $4.94, a margin of only 13% instead of 25%. The markup on product cost in the correct result is (45.24 − 24) ÷ 24 = 88.50%.
Sales tax and VAT
In the US, sales tax is charged on top of the marked price at checkout, and the rate depends on the state and locality, so it is not part of your margin: leave the tax field at 0. If you sell in a country where shelf prices include VAT, enter the VAT rate. The calculator then shows the gross price, and if a marketplace charges its fee on the price including VAT, choose that option – the fee then equals f × (1 + VAT rate) of the net price, and the formula becomes price = cost ÷ (1 − m − f × (1 + t)).
Prices and profit are rounded to the cent, so the actual margin can differ from the target by a few hundredths of a percent.
Frequently asked questions
How do I calculate a selling price from cost and margin?
Divide the cost by (1 − margin). For a 40% margin on a $60 cost: 60 ÷ 0.6 = $100. Adding 40% to the cost ($84) would only give a 28.57% margin.
How do I include a percentage fee in my price?
Subtract the fee rate in the denominator: price = cost ÷ (1 − margin − fee). With $28.50 cost, 25% margin and a 12% fee: 28.50 ÷ 0.63 = $45.24.
Should I include sales tax in my margin?
No. Sales tax is collected for the government and passed on, so calculate margin on the price before tax.
What is the difference between margin and markup here?
Margin is profit divided by the price, markup is the price increase over product cost divided by the cost. In the example the margin is 25%, the markup on product cost 88.50%.
What is the Excel formula for the selling price?
With cost in A2, other unit costs in B2, fee rate in C2 and margin in D2 (as percentages): =(A2+B2)/(1-D2-C2).
Sources and legal basis
As of:
Related tools
- Margin calculatorProfit margin calculator: margin %, markup %, gross profit and price multiplier from cost and price – or the selling price for a target margin or markup.
- Break-even calculatorBreak-even point calculator for small businesses: units and sales dollars to break even from fixed costs, price and variable cost, plus a target profit.
- Selling Fee Calculator for Etsy, eBay, Amazon and ShopifyCalculate Etsy, eBay, Amazon and Shopify seller fees: commission, payment processing, payout, profit and margin per sale – with sources, as of 09/2026.
- German VAT calculatorGerman VAT calculator: add VAT to a net price or remove it from a gross price at 19%, 7% or a custom rate – rounded to the cent, with formulas.
- VAT calculator for France and SpainAdd or remove French VAT (TVA 20%, 10%, 5.5%, 2.1%) or Spanish VAT (IVA 21%, 10%, 4%) – net to gross and back, rounded to the cent, with official sources.
- Conversion rate calculatorCalculate your marketing conversion rate from visitors and conversions, plus average order value and revenue per visitor – or the traffic you need for a goal.