Margin calculator

Enter any two of these values: cost, selling price, margin, or markup. The tool calculates the other two and shows margin and markup side by side, with sales tax, platform fees, and extra costs if you need them.

Profit ÷ price.

Profit ÷ cost.

Enter any two of the four values. The other two are calculated for you and marked as calculated.

Sales tax, fees, and extra costs

Leave empty if there is no sales tax.

Charged on the selling price before tax.

Shipping, packaging, labels.

Margin
—

Enter two values, for example the cost and the selling price.

Formula
—
With your values
—
Step by step

How to use it

  1. Enter any two values: cost, selling price, margin, or markup. The other two are calculated for you.
  2. If you charge sales tax, pay a marketplace fee, or have extra costs per unit such as shipping, open “Sales tax, fees, and extra costs” to see your real net profit.
  3. For many products, choose “Several products”, set the margin you want, and enter the cost of each one: you get the suggested selling price.
  4. Copy the result, share a link with the same values, or download the price list as a CSV file.
FAQ

Frequently asked questions

What is the difference between margin and markup?

Both measure profit, but on different bases. Margin is profit divided by the selling price; markup is profit divided by the cost. With a cost of $60 and a price of $100, the profit is $40: the margin is 40% and the markup is 66.67%. That is why a 50% markup is not a 50% margin, but a 33.33% one.

How do I calculate the selling price from a margin?

Divide the cost by one minus the margin. With a cost of $60 and a 40% margin, the price is 60 ÷ 0.60 = $100. If you use markup instead, multiply the cost by one plus the markup: 60 × 1.667 = $100.

Does sales tax count toward margin?

No. Sales tax is not profit, you collect it for the government. That is why margin and markup are calculated on the price before tax. If the price you enter already includes tax, turn on that option and the tool removes the tax before calculating.

How do I account for a marketplace fee?

Enter the fee percentage and the per-unit costs under “Sales tax, fees, and extra costs”. You will see your actual net profit, the net margin, and the break-even price, the lowest price at which you do not lose money. The fee is calculated on the selling price before tax.

Can a margin be negative or 100%?

Negative, yes: it means you sell below cost and lose money. A margin can never reach 100%, because that would require a cost of zero or an infinite price. Markup can go above 100%.

Is the data for my products saved?

No. Everything is calculated in your browser and nothing is sent to a server. You can copy a link with your values to reopen them later.

Margin and markup formulas

Profit = price − cost. Margin = profit ÷ price × 100. Markup = profit ÷ cost × 100. With a cost of $60 and a price of $100: profit $40, margin 40% and markup 66.67%.

Converting one into the other

To go from markup to margin: margin = markup ÷ (100 + markup). To go from margin to markup: markup = margin ÷ (100 − margin). A 100% markup (you double the cost) is a 50% margin.

Selling price for what you are aiming for

  • For a given margin: price = cost ÷ (1 − margin).
  • For a given markup: price = cost × (1 + markup).
  • For a net margin after fees and extra costs: price = (cost + extras) ÷ (1 − fee − margin).

Tips

  • Always compare using the same measure: if your supplier talks about markup and your accountant about margin, convert them before deciding.
  • Work out the break-even price before offering discounts: below that value you lose money on every sale.
  • Check each marketplace’s current fees: they change often.

Updated on September 29, 2026