Percentage Difference Calculator
This percentage difference calculator compares two non-negative values without treating either one as the start. Enter value A and value B. The result is the absolute gap divided by their average, times 100. The sections below show the formula, how it differs from percentage change, and worked examples.
Calculate the difference
The two bars compare value A with value B; both are redrawn from your numbers on every calculation.
Formula
Percentage difference = |a − b| / ((a + b) / 2) × 100. The same pair gives the same result in either order, unlike directional percentage change. For values 80 and 100 the absolute gap is 20 and the average is 90, so 20 / 90 × 100 displays as 22.22%. Swapping the two values still gives 22.22%.
How to calculate
Step 1: subtract the smaller value from the larger one to get the absolute gap. Step 2: add the two values and divide by 2 to get their average. Step 3: divide the gap by that average and multiply by 100. The form does all three steps when you enter value A and value B and press Calculate difference.
Worked examples
Example A: 80 and 100. The gap is 20, the average is 90, and 20 / 90 × 100 displays as 22.22%. Example B: 20 and 30. The gap is 10, the average is 25, and 10 / 25 × 100 displays as 40.00%. Example C: 9 and 12. The gap is 3, the average is 10.5, and 3 / 10.5 × 100 displays as 28.57%. Entering each pair in the other order returns the same three results.
Difference versus percentage change
Percentage change divides by the starting value, so the direction matters. From 80 to 100 the increase is (100 − 80) / 80 × 100, which is 25.00%. From 100 to 80 the decrease is (100 − 80) / 100 × 100, which is 20.00%. Percentage difference divides the same gap of 20 by the average of 90, so both orders display 22.22%. Use difference when neither value is the base. Use the percentage increase or percentage decrease calculator when one value is the start.
Input format and limits
Each field accepts one decimal number: up to 100 characters, digits with a dot for the fraction part, and no commas, currency symbols, or exponent notation such as 1e3. A blank field asks you to enter that value. A negative value is refused with a message asking for zero or greater. Both values zero is refused because the average in the denominator would be zero; the status line says the percentage difference is undefined. One value may be zero: 0 and 10 give a gap of 10 and an average of 5, which displays as 200.00%.
Rounding and displayed results
Inputs are parsed as decimals and processed with integer arithmetic on exact fractions, so intermediate steps keep full precision. Only the final display rounds, to two decimal places, and it rounds halves up. Values 1 and 2 give 1 divided by 1.5 times 100, which displays as 66.67%. Equal values, such as 50 and 50, display as 0.00%.
How it's calculated
Both fields are non-negative decimals. A leading minus is parsed and then refused; commas and exponents are refused; each field is at most 100 characters. The result is the absolute gap times 200 divided by (a + b), which is |a − b| / ((a + b) / 2) × 100. Both zero is refused because that sum is zero. Order does not change the result. The shown number is that exact ratio rounded once to two decimal places, with an exact half moving away from zero. Last updated: 2026-11-05.
Frequently asked questions
What formula does this percentage difference calculator use?
It uses |a − b| / ((a + b) / 2) × 100. The absolute gap is divided by the average of the two values, then multiplied by 100. Values 80 and 100 give 20 / 90 × 100, which displays as 22.22%, and the same pair in the other order displays 22.22% as well.
How is percentage difference different from percentage change?
Percentage change divides by the starting value, so 80 to 100 is an increase of 25.00% and 100 to 80 is a decrease of 20.00%. Percentage difference divides by the average, so that pair displays 22.22% in either order. This page does not report a signed increase or decrease.
What happens if both values are zero, or one of them is zero?
Both zero is refused. The average would be zero, so the status line says the percentage difference is undefined instead of printing a number. One zero is allowed: 0 and 10 have a gap of 10 and an average of 5, and the result displays as 200.00%.
Can I enter a negative value or leave a field blank?
No. A blank field asks you to enter that value, and a negative value is refused with a message asking for zero or greater. Commas, currency symbols, and exponent forms such as 1e3 are also refused. Correct the named field and submit again.
Does the tool round numbers during the calculation?
No. The formula runs on exact fractions built from the digits you type, and rounding happens once, on the final displayed value, to two decimal places with halves rounded up. That is why values 1 and 2 display as 66.67% rather than a truncated 66.66%.