Selling Price Calculator
Enter a cost and a target profit margin or markup to get the selling price. The real margin and the gross profit at that price are shown as well.
Steps for setting a price
Work through these in order to avoid mistakes.
- Decide the cost. Using a cost before tax keeps tax out of the comparison.
- Choose what the target is based on: profit margin is a percentage of the selling price, and markup is a percentage of the cost.
- Enter the target and calculate the price.
- Pick the price you will actually charge (for example, a round number) with the result in mind.
The difference between the two modes
The same "40%" gives a different price depending on what it is a percentage of. For an item that costs 600:
| Mode | Formula | Price | Real profit margin |
|---|---|---|---|
| Profit margin 40% | price = cost ÷ (1 − 0.4) | 1,000.00 | 40.00% |
| Markup 40% | price = cost × (1 + 0.4) | 840.00 | 28.57% |
- Profit margin is the share of the price that is profit. Use it when you want "40% of the price to be profit".
- Markup is the amount added on top of the cost. Use it when you want to "add 40% to the cost".
Pricing with a 40% markup does not give a 40% profit margin (28.57% in this example). Agree with your team and your customers which one you mean.
A profit margin must be below 100%, or the price cannot be determined (a 100% margin would need a cost of 0). Here, a markup can be set from 0 to 1,000%. These formulas follow the reference articles listed under "Source" below.
Why the price is rounded up
If the price does not divide evenly, it is rounded up to the smallest unit (for example, the cent). Rounding down or to the nearest unit can leave the margin slightly below the target.
For a cost of 500.00 and a target margin of 33%:
- The calculated price is 500 ÷ (1 − 0.33) = 746.2686…, which is rounded up to 746.27.
- At 746.27 the real margin is 33.00% (246.27 ÷ 746.27), so the target is met.
- At 746.26 the margin would be just under 33%.
The real margin of a rounded-up price is the same as the target or slightly higher. The screen shows the real margin so you can check it.
Examples
| Cost | Target | Price | Gross profit | Real profit margin |
|---|---|---|---|---|
| 600.00 | Margin 40% | 1,000.00 | 400.00 | 40.00% |
| 700.00 | Margin 30% | 1,000.00 | 300.00 | 30.00% |
| 500.00 | Margin 33% | 746.27 | 246.27 | 33.00% |
| 600.00 | Markup 40% | 840.00 | 240.00 | 28.57% |
Things to know
- Enter a cost of 0 or more, up to 9,999,999,999.99, with up to 2 decimal places. The amounts have no currency.
- Percentages accept up to 2 decimal places: 0% to under 100% for a margin, 0% to 1,000% for a markup.
- A margin close to 100% gives a huge price: at 99.99% the price is 10,000 times the cost.
- If the cost is 0, the price is 0, and the real margin cannot be calculated ("—" is shown).
- This gives a guide to a price from a cost. Competitors' prices, demand, fees and shipping should also be considered.
- The result is a guide. Check your books for figures used in accounting or tax filings.
Source
The relation between markup and margin follows Wikipedia, "Markup (business)": https://en.wikipedia.org/wiki/Markup_(business) (read on November 1, 2026): markup = (sale price − cost) ÷ cost, and margin = markup ÷ (markup + 1). It is an explanatory article, not a standard. The examples above are worked out here from those formulas.
Frequently asked questions
What price gives a 40% margin on a cost of 600?
600 ÷ (1 − 0.4) = 1,000. The gross profit is 400.
Why is the price sometimes one unit higher than I expected?
Because the price is rounded up. Rounding down can leave the margin below the target.
How should I treat fees and shipping?
The calculator works only from the cost you enter. Put costs of a fixed amount, such as shipping, into the cost. A fee that is a percentage of the price changes with the price, so this calculator cannot take it into account.
How do I find the margin from a price and a cost?
When the price and the cost are known, use the Profit Margin Calculator.