Percent Difference Calculator
Percent difference is the gap between two values divided by their average, as a percentage. See the working, plus the percent change in each direction.
Calculator
Either value, for a percent difference. For a percent change, the starting value.
In the same units as the first. For a percent change, the value it changed to.
Never above 200%, which it reaches only when a value is zero or the two have opposite signs.
Working, with your numbers
- % difference = |a - b| / ((|a| + |b|) / 2) x 100
- = |40 - 50| / ((40 + 50) / 2) x 100
- = 10 / 45 x 100
- = 22.22 %
Values are converted into the units the equation is worked in before the arithmetic.
- Absolute difference The gap itself, in the units of the two values.
- 10
- Change from first to second Percent change, dividing by the first value. Its size is also the percent error of the second if the first is the accepted value.
- +25%
- Change from second to first Percent change the other way, dividing by the second value, which is why it differs from the change above.
- −20%
Citing this tool
Last updated . Add the date you accessed it as well, which a citation of a page that can change asks for. If a specific result matters, cite the permalink from the tool’s share row instead of this page: it reproduces the exact parameters.
The equation
Relative percent difference, US EPA SW-846 Chapter One (2014)
Percent difference compares two values of equal standing
Percent difference is the absolute difference between two values divided by
their mean, times 100:
% difference = |a − b| ÷ ((|a| + |b|) ÷ 2) × 100. For 40 and
50, the values loaded on screen, that is 10 ÷ 45 × 100 = 22.2%.
It is the comparison to use when neither value has a claim to be right: two lab groups measuring the same thing, two instruments reading the same sample, a pair of duplicate analyses. Dividing by the mean treats the two alike, so the answer is the same whichever you call first. That symmetry is the point, and it is what separates percent difference from percent error, which divides by an accepted value, and from percent change, which divides by the starting value.
The mean is taken of the sizes of the two values. For two positive numbers
that is the ordinary average, and the formula reads
|a − b| ÷ ((a + b) ÷ 2) × 100. For two negative numbers the
sizes keep the answer positive, since a percent difference has no direction.
A pair that includes a zero, or that sits either side of zero, is dealt with
further down, because the answer for it is always the same and never useful.
Worked example: two density readings
Two groups measure the density of the same aluminium block and get 2.61 g/cm³ and 2.75 g/cm³.
difference = |2.61 − 2.75| = 0.14 g/cm³mean = (2.61 + 2.75) ÷ 2 = 2.68 g/cm³% difference = 0.14 ÷ 2.68 × 100 = 5.22%
The results differ by 5.2 percent of their mean. Divide by either reading instead and you get 5.36 percent or 5.09 percent, which is the ambiguity the mean removes: neither group gets to be the denominator. How far each group sits from aluminium’s accepted density, about 2.70 g/cm³, is a different question, and the percent error calculator answers it: 3.3 percent low for the first group and 1.9 percent high for the second.
Percent difference, percent change and percentage points
Percent change is the other calculation people mean by “percentage
difference”, and it gives a different number. It divides by the starting
value and keeps the sign: % change = (new − old) ÷ |old| × 100.
The readouts show it both ways round, because the two directions disagree.
From 40 to 50 is a rise of 25 percent, and from 50 back to 40 is a fall of
20 percent. For two values of the same sign the percent difference always
lands between the two, here at 22.2 percent, because the mean lies between
the values.
The same asymmetry is why a rise and an equal fall do not cancel. Ten percent
up and then ten percent down leaves you 1 percent below where you started,
because the fall is taken from the larger number:
100 × 1.1 × 0.9 = 99.
Values that are already percentages need one more word. A reaction yield that improves from 60 percent to 75 percent has risen by 15 percentage points, which is a percent change of 25 percent. Both statements are true and they are not the same statement, so say which one you mean.
Duplicates and the relative percent difference
Analytical laboratories use the same formula under the name relative percent difference, or RPD, to judge a pair of duplicate results. The US EPA’s SW-846 compendium of test methods names it, beside the relative standard deviation, as the usual estimate of precision when only two results are available. The formula does not say what counts as acceptable: the limit a pair has to meet comes from the method and the project’s quality assurance plan.
Solving for the second value turns a limit into a range. With a first result of 50 and a 20 percent limit, the second has to fall between 40.91 and 61.11. The range is lopsided, 11.11 above 50 and 9.09 below it, because the second value moves the mean as well as the difference. Choose Solve for this on the second value and the working gives both ends.
For three or more replicates, use the coefficient of variation from the standard deviation calculator, which is the relative standard deviation SW-846 pairs with RPD. The two are not interchangeable even for a pair: for two positive results the coefficient of variation is the RPD divided by √2, so duplicates of 48.2 and 51.6 have an RPD of 6.81 percent and a coefficient of variation of 4.82 percent.
Only on a scale with a true zero
A percentage compares a gap with the size of the values, so it only means something when zero means none of the quantity. Temperatures in degrees Celsius fail that test. Readings of 20 °C and 25 °C give a percent difference of 22.2 percent, while the same two temperatures in kelvin, 293.15 K and 298.15 K, give 1.69 percent. The kelvin figure is the meaningful one, and the Celsius figure depends on where the scale’s zero happens to be.
The same reasoning sets the ceiling. Two values cannot differ by more than the sum of their sizes, which is twice their mean, so a percent difference never exceeds 200 percent. It reaches 200 percent when one value is zero, and with the mean taken of the sizes every pair of opposite sign gives exactly 200 percent however close the two are: −0.1 and 0.1 score the same as −100 and 100. The calculator flags both cases, because the percentage then says nothing about how far apart the values are. Quote the absolute difference instead.
Common mistakes
- Dividing by one of the values. That is a percent change or a percent error, not a percent difference, and it makes the answer depend on which value you happened to write first. Divide by the mean.
- Calling a percent change a percent difference. “50 is 25 percent more than 40” is a percent change, while the percent difference of 40 and 50 is 22.2 percent. A question that says increase or decrease, or names an original value, wants percent change.
- Using it when one value is accepted. A result compared with a textbook constant is a percent error, divided by the constant. Averaging the two would treat the textbook value as no more trustworthy than your reading.
- Mixing units. Put both values in the same unit before comparing them, and temperatures in kelvin. The unit converter does both.
- Reading significance into it. A 5 percent difference between two readings is large or trivial depending on how precise they are. It is a real disagreement only when it is bigger than the combined uncertainty of the two.
What this calculator does not cover
It takes two numbers and nothing else, so it cannot say whether a difference is real. If each density reading in the worked example is good to ±0.05 g/cm³, their difference carries an uncertainty of about ±0.07 g/cm³, combined in quadrature, so the 0.14 g/cm³ gap is about twice its uncertainty: worth a second look rather than proof that either group went wrong. The error propagation calculator does that combination.
It also compares exactly two values. A set of replicates is better described by its standard deviation than by any pairwise percentage, since the choice of which pair to compare would otherwise decide the answer.
Worked examples
Each one runs through the calculator above, so the arithmetic here is the arithmetic it does.
What is the percent difference between 37 °C and 39 °C?
- % difference = |a - b| / ((|a| + |b|) / 2) x 100
- = |310.15 - 312.15| / ((310.15 + 312.15) / 2) x 100
- = 2 / 311.15 x 100
- = 0.6428 %
0.64 percent, worked in kelvin, 310.15 K and 312.15 K, because a percentage needs a scale whose zero means none of the quantity. In degrees Celsius the same pair gives 5.26 percent, and in Fahrenheit, 98.6 and 102.2, it gives 3.59 percent: three scales, three answers, and only the kelvin one means anything.
What is the RPD of duplicate results of 12.4 and 13.1 mg/L?
- % difference = |a - b| / ((|a| + |b|) / 2) x 100
- = |12.4 - 13.1| / ((12.4 + 13.1) / 2) x 100
- = 0.7 / 12.75 x 100
- = 5.49 %
5.49 percent. RPD is the laboratory name for percent difference, and it divides by the mean because neither duplicate is the true result. Whether 5.49 percent passes depends on the limit the method or the project sets, which the formula knows nothing about.
Which second results are within a 10 percent RPD of a first result of 25?
- b = a x (200 + %) / (200 - %), or a x (200 - %) / (200 + %)
- = 25 x (200 + 10) / (200 - 10)
- = 25 x 1.10526
- = 27.6316, or 22.619 nearer zero
Anything from 22.62 to 27.63 passes, and the window is lopsided: 2.63 above 25 but only 2.38 below it. The second result moves the mean as well as the difference, so the same limit allows more room above the first result than below it.
Common questions
How do you calculate percent difference?
Divide the absolute difference between the two values by their mean, then multiply by 100. For 40 and 50 that is 10 ÷ 45 × 100 = 22.2 percent. Dividing by the mean rather than by either value is what makes the answer the same whichever value you call first.
What is the difference between percent difference and percent change?
Percent change has a direction and percent difference does not. Percent change divides by the starting value and keeps the sign, so going from 40 to 50 is +25 percent and coming back from 50 to 40 is −20 percent. Percent difference divides by the mean and is 22.2 percent either way, which is why it suits two measurements of equal standing.
When should I use percent difference instead of percent error?
Use percent difference when neither value is known to be right, and percent error when one of them is an accepted value. Results from two lab groups, or duplicate analyses of one sample, call for percent difference. A measurement checked against a textbook constant calls for percent error, which divides by the accepted value instead of the mean.
Can percent difference be more than 100 percent?
Yes, up to 200 percent but never beyond it. For two values of the same sign it passes 100 percent once one is more than three times the other. It cannot pass 200 percent because two values never differ by more than the sum of their sizes, which is twice the mean the formula divides by. One value of zero, or two values of opposite sign, put it exactly on 200 percent, where the percentage stops saying anything useful and the absolute difference is the better figure to quote.
Can percent difference be negative?
No. It is the size of the gap between two values divided by the mean of their sizes, so it runs from 0 to 200 percent and has no direction, even for two negative values. When the direction matters you want percent change, which the calculator gives both ways, with + on a rise.
What is relative percent difference (RPD)?
It is the same calculation under the name analytical laboratories use for duplicates: the absolute difference between two results divided by their mean, times 100. The US EPA’s SW-846 manual gives it as the usual measure of precision when only two results are available, and leaves the limit a pair must meet to the method and the project’s quality assurance plan.