Skip to content

Margin and Markup Calculator — Work Out the Selling Price

The margin and markup calculator compares the purchase price with the selling price, or works out the price for a target margin. Choose a mode, enter amounts of the same kind and see the percentages and the price difference. The calculation does not include other costs.

Calculate the margin, markup or selling price

In the Margin and Markup modes, enter the purchase price and the selling price. In Selling price mode, enter the purchase price and the target margin. The starting values are an example. Do not compare a net purchase price with a gross selling price; you can do the necessary conversion in the VAT calculator.

Margin and markup parameters

Margin relates the difference to the selling price, markup to the purchase price. The third mode calculates the price from a target margin.

Comparable prices, e.g. both net. From PLN 0 to PLN 1 billion; positive amounts from PLN 0.01 — a technical range.

The selling price can be lower than the purchase price. To calculate the margin, it must be greater than zero.

How does the margin and markup calculator work?

Both measures use the same difference between the selling price and the purchase price, but relate it to a different base. Margin relates the difference to the selling price, and markup to the purchase price. That is why the percentages are usually different for the same amounts. Choosing a mode changes the main result, not the prices entered.

Margin = (selling price − purchase price) / selling price × 100%. Markup = (selling price − purchase price) / purchase price × 100%. With a purchase at PLN 80 and a sale at PLN 100, the difference is PLN 20. The margin is 20 / 100 = 20%, while the markup is 20 / 80 = 25%. So adding 20% to the purchase price is not the same as achieving a 20% margin.

In Selling price mode, we use the formula: price = purchase price / (1 − m / 100), where m is the target margin as a percentage. For a purchase price of PLN 80 and a 20% margin, we divide 80 by 0.8 and get a price of PLN 100. This is the price that follows only from the purchase price and margin entered, without additional assumptions about demand or competition.

The price difference is not the business’s net profit. The calculator does not know the costs of delivery, commission, storage, staff, taxes or other expenses. It does not deduct them from the result. Enter comparable amounts in both fields, in the same currency and on the same basis, for example both net.

Step-by-step example — purchase at PLN 100, sale at PLN 150

  1. The price difference is 150 − 100 = PLN 50.
  2. The margin is 50 / 150 × 100%, or about 33.33%.
  3. The markup is 50 / 100 × 100% = 50%.
  4. If you want a 30% margin instead, switch to Selling price.
  5. For a purchase price of PLN 100, the price from the target margin is 100 / 0.7, or about PLN 142.86, and the price difference about PLN 42.86.

We show amounts and percentages to two decimal places, but do not round intermediate operations. The displayed price of PLN 142.86 is a rounded presentation of the model result. If you then enter it as the selling price, the calculation will start from this new amount. We do not promise identical raw results after repeatedly copying rounded values.

Sources and how up to date the calculations are

The marginFromPrices, markupFromPrices and salePriceFromMargin formulas were compared with the code of the Margin / markup module in Procentownik 1.10.24. Code check: 30 October 2026. We do not use tax rates, exchange rates or external offers here. The result depends on your data and the chosen direction of calculation.

The field ranges are technical limits of the form, not profitability standards or recommended margin levels. The tool does not match the price to an industry and does not assess whether a sale is profitable once all expenses are taken into account. With more precise input, the calculations keep the value you entered.

Frequently asked questions

What is the difference between margin and markup?

The base for margin is the selling price, and the base for markup is the purchase price. For a purchase at PLN 100 and a sale at PLN 150, the difference of PLN 50 means a margin of about 33.33% and a markup of 50%. These are two descriptions of the same prices, not two different amounts.

Can I calculate the price from a target margin?

Yes. Choose Selling price and enter a positive purchase price and a margin below 100%, within the form’s range. With a purchase price of PLN 100 and a 50% margin, the price is PLN 200. Adding PLN 50 to the purchase price would give a 50% markup, not a 50% margin.

What does a negative margin or markup mean?

It means the selling price is lower than the purchase price. For a purchase at PLN 100 and a sale at PLN 80, the difference is −PLN 20, the margin −25% and the markup −20%. This is the result of comparing these two prices, without analysing other income and costs.

Why does a percentage result not always make sense with a zero price?

Margin requires a non-zero selling price, and markup a non-zero purchase price. With a purchase at PLN 0 and a sale at PLN 100, the margin is 100%, but the markup is undefined. With a purchase at PLN 100 and a sale at PLN 0, the markup is −100%, but the margin is undefined. We do not replace division by zero with a result of 0%.

Why is a target margin of 100% rejected?

The formula for the price from a margin involves dividing by 1 − m / 100. At 100%, the denominator is zero. With a positive purchase price, there is no finite selling price that gives exactly that margin. The form accepts up to 99.999% as a technical input limit.

Are my prices saved on a server?

The calculations run in your browser, without sending the form values to the studio. Copy result puts a summary, including the mode, the data and the relevant formula, on your clipboard. You decide where to paste it later.

Related calculators

More than a calculator.

Margin and markup in Procentownik too

You will find the Margin / markup module in the Business category. The app lets you go back to your calculation history, use your favourite tools and choose one of two themes, for day and night. See the description of Procentownik or use the button to download the app.

The result is a mathematical comparison of prices and assumptions, not net profit, a price recommendation or a full profitability analysis.

Overview of categories and tools in Procentownik
Overview of categories and tools in Procentownik