What is the percent difference formula?

Short answer. Percent difference = |a − b| ÷ ((a + b) ÷ 2) × 100. Subtract the two values, drop the sign, divide by their average, multiply by 100. Readings of 72 and 76 differ by 4, their average is 74, and 4 ÷ 74 × 100 = 5.41%. Use it when neither value is the correct one.

Percent difference answers a question with no favourite in it: how far apart are these two numbers, as a share of their size? It is the right tool when you have two readings, two quotes or two estimates and no reason to trust one over the other. The formula is four operations long. The one people skip is the average.

The formula

                        |a − b|
percent difference  =  ─────────────  × 100
                        (a + b) ÷ 2

The top is the gap between the values, with the sign thrown away. The bottom is their mean, the plain average of the two. Dividing by the mean is what makes the result fair to both numbers, because neither of them gets to be the denominator.

A worked example

Two thermometers in the same room read 72 and 76. Neither is calibrated, so there is no accepted value to measure against:

Subtract        76 − 72             =  4
Drop the sign   |4|                 =  4          the gap
Average         (72 + 76) ÷ 2       =  148 ÷ 2  =  74
Divide          4 ÷ 74              =  0.054054…
× 100                               =  5.41%

Start with 72 − 76 instead and you get −4, which the absolute value bars turn straight back into 4. The order of the two values does not matter anywhere in this formula, and that is the whole point of it.

Why divide by the average

Divide by one of the values instead and you have percent change, which cares very much about order:

72 → 76     4 ÷ 72 × 100  =  5.56% increase
76 → 72     4 ÷ 76 × 100  =  5.26% decrease

72 vs 76    4 ÷ 74 × 100  =  5.41% difference, either way round

Same gap, two different percentages, depending on which thermometer you happened to read first. Percent change is built for before and after, where the starting value is the honest baseline. When there is no before, the average is the only denominator that treats both values the same. The percent difference lands between the two percent changes, which is exactly where it should be.

Percent difference, percent change, percent error

Three formulas, three denominators. Take a copper sample measured at 8.78 g/cm³ against the accepted 8.96 g/cm³, the example from the percent error post, and run all three:

gap                 |8.78 − 8.96|            =  0.18

percent error       0.18 ÷ 8.96 × 100        =  2.01%   ÷ the accepted value
percent difference  0.18 ÷ 8.87 × 100        =  2.03%   ÷ the mean of the two
percent change      0.18 ÷ 8.78 × 100        =  2.05%   ÷ the starting value

Close here, because 8.78 and 8.96 are close. Pull the values apart and the three answers pull apart with them. For 50 and 100 the percent difference is 50 ÷ 75 × 100 = 66.67%, while the percent change is a 100% increase one way and a 50% decrease the other. Pick the formula by asking what you are dividing by: a value you trust, a value you started from, or neither.

UseDenominatorSign
Percent errorThe accepted valueUsually dropped
Percent changeThe starting valueKept, shows direction
Percent differenceThe average of bothAlways dropped

It is not only for the lab

Two builders quote $1,250 and $1,400 for the same job. Neither is the right price, they are just two prices:

Gap        1,400 − 1,250        =  150
Average    (1,250 + 1,400) ÷ 2  =  1,325
           150 ÷ 1,325 × 100    =  11.32%

The quotes are 11.32% apart. Saying the second is 12% more than the first, or that the first is 10.71% less than the second, is also true, but each of those sentences picks a side. Percent difference is the sentence that does not.

Quick reference

abGapAveragePercent difference
72764745.41%
8.788.960.188.872.03%
1,2501,4001501,32511.32%
2030102540.00%
352450.00%
50100507566.67%
1999850196.00%

Why it tops out at 200%

Percent change has no ceiling: 1 to 99 is a 9,800% increase. Percent difference does. As one value heads toward zero, the gap heads toward the other value while the average heads toward half of it, so the ratio closes in on 2:

1 vs 99     98 ÷ 50 × 100  =  196%
0 vs 40     40 ÷ 20 × 100  =  200%

A percent difference above 200% is an arithmetic slip. A percent difference anywhere near it means the two values have almost nothing in common, and the number is telling you to stop comparing them.

Where the decimals go wrong

The formula opens by subtracting two numbers that are usually close, and that is the operation binary floating point handles worst. Take the copper example on a calculator that works in binary:

Exactly     8.96 − 8.78  =  0.18
In binary   8.96 − 8.78  =  0.1800000000000015

Neither 8.96 nor 8.78 has an exact binary form, so the machine subtracts the nearest values it can store and the leftover shows up in the gap before the division even starts. It is the same fault as 0.1 + 0.2 = 0.30000000000000004. Prism computes in exact decimals, so 8.96 − 8.78 is 0.18, the average of 8.78 and 8.96 is 8.87 rather than 8.870000000000001, and 0.1 + 0.2 is 0.3.

Prism Calculator icon

Subtract, average, divide

Percent difference is three keystrokes in Prism's free calculator, with the gap and the average kept in history. The built-in percentages tool handles the cousins: percent change between two values and one value as a percentage of another. Percentages are free forever. No ads, no subscription. See the app.