DevTools Logo

Percentage Calculator

Percentage Calculator

What is X% of Y, how much did a value change, and the percentage difference between two numbers.

%
Try a sample:

About this tool

Percentage Calculator answers the three percentage questions people actually type into a search box, on one page. “X% of Y” multiplies: 30% of 80 is 24, and a negative percent is a discount rather than an error. “Change” compares a start value with an end value: 40 to 60 is a 50% increase, 100 to 75 is a 25% decrease. “Difference” drops the direction and compares the gap to the average of the two numbers, so 40 and 60 differ by 40% — a different question from the 50% change, and the page keeps them apart so the two answers are not mixed up.

Change from zero is undefined. Dividing by a start value of 0 would print infinity; the calculator refuses and points at the difference mode, which still has a meaning when one of the numbers is zero and the other is not. Difference is undefined only when the two numbers average to zero, for example 5 and −5.

The change mode also shows what you get if you apply that same percent back to the start value, which is the “30% off” form: 100 decreased by 30% is 70. Results are rounded to four significant figures so 1/3 of a percent does not spill into a long float.

Nothing is uploaded. The formula used for the current mode is printed under the result, so a disputed number can be checked by hand.

How to use this tool

  1. Pick a mode

    Choose X% of Y, Change, or Difference. Each mode is a different question.

  2. Enter both numbers

    A comma is accepted as a decimal separator. Empty or non-numeric input is an error, not zero.

  3. Calculate

    Press Calculate or Enter. The result, the unit and the formula appear together.

  4. Try a sample

    The chips fill a known pair so you can see 30% of 80, a 50% increase, or a 40% difference.

Frequently asked questions

What is 30% of 80?

24. Percent-of multiplies the base by the percent divided by 100.

Why is 40 to 60 both 50% and 40%?

Change uses the start value as the base, so (60−40)/40 is 50%. Difference uses the average, so |60−40|/50 is 40%. They answer different questions.

Can the start value be zero?

Not for percentage change — the result is undefined. Use difference, or state the change as an absolute number.

How do I calculate 30% off?

In change mode the “start plus this percent” row applies a negative percent: 100 at −30% is 70.