Discount Calculator

What a percentage off actually leaves you paying.

Runs entirely in your browser

Loading the tool…

—

Put the discount in A as a negative number and the original price in B. It opens on 20% off 50, which is 40. The sentence underneath reads "50 less 20% = 40" so the sign never has to be worked out from the answer.

Two discounts do not add up. 20% off then a further 10% off is not 30% off: the second is taken from the already-reduced price, so 100 becomes 80 and then 72, which is 28% off. This is why "extra 10% off sale items" is worth less than it sounds, and why stacking codes rarely reaches the number in your head.

A discount and a mark-up of the same percentage do not cancel either. Take 20% off 100 and you have 80; add 20% back and you have 96. The percentage is of a smaller number the second time. A shop that raises a price 25% and then advertises 20% off is selling at exactly the original price.

To go the other way, from two prices to the discount between them, switch the question to "percent change from A to B" with the original as A: the answer comes back negative, which is what a reduction is.

How to use it

  1. Put the rate in A and the amount in B. The answer updates as you type.
  2. Read the sentence underneath to check it says what you meant.
  3. Change the question in the menu for any of the other three.

Questions

How do I calculate a percentage off?

Multiply by one minus the rate: 20% off means multiplying by 0.8. This page does it by taking a negative rate in A, so -20 on 50 gives 40. To see what you save rather than what you pay, switch the question to "what is A% of B" with 20 and 50, which gives 10.

Do two discounts add together?

No, and this is the one worth knowing. 20% off followed by 10% off is 28% off, not 30%, because the second is applied to the already-reduced price. Three stacked discounts drift further still. Multiply the remainders instead: 0.8 times 0.9 is 0.72.

Does a discount cancel out a mark-up of the same percentage?

No. 100 with 20% added is 120, and 20% off that is 96. Taking 20% off first gives 80, and adding 20% back gives 96 as well. Either order lands short, because the second percentage is of a different number. A price raised 25% and then discounted 20% is back exactly where it started.

How do I find the discount between two prices?

Switch the question to percent change from A to B, with the original price as A and the sale price as B. A drop from 50 to 40 comes back as -20%. That is the same calculation a shop does in reverse when it decides what to put on the label.

Is my calculation sent anywhere?

No. The arithmetic runs in WebAssembly in this tab and the page is served with a header forbidding it from opening a connection to anywhere. Nothing you type is recorded, and it works with the network off.

The other one

The same calculator opened on a different question. Both take any rate and any amount once you are there.

Your data stays on your device

Everything above runs inside your browser as WebAssembly compiled from Rust. Nothing you type is uploaded, logged or stored on a server. You can load this page once, go offline, and it still works.

This page makes no requests at all, to anywhere. That is not a promise in the copy: it is a Content-Security-Policy header your browser enforces, and connect-src on it is none. Open the network tab and watch nothing happen.