Percentage difference between two numbers
The percentage difference compares two values without treating either one as the reference point — useful when neither number is a “before” or “after”, such as comparing two measurements, two prices, or two test results. Because it is symmetric, the order you enter the numbers does not change the answer.
How it works
The calculator divides the absolute difference by the average of the two numbers, then scales to a percentage:
percentage difference = |A − B| ÷ ((A + B) ÷ 2) × 100
Using the average (rather than one of the values) is what makes the result the same whichever way round you enter the numbers, and it is always positive. Use percentage change instead when one value is clearly the original.
Example
Compare A = 40 and B = 60:
- Absolute difference: |40 − 60| = 20
- Average: (40 + 60) ÷ 2 = 50
- Percentage difference: 20 ÷ 50 × 100 = 40%
| A | B | Average | % difference |
|---|---|---|---|
| 40 | 60 | 50 | 40% |
| 90 | 100 | 95 | 10.53% |
| 8 | 8 | 8 | 0% |
Everything here runs in your browser — nothing is uploaded.
Percentage difference vs percentage change — choosing the right one
These two calculations look similar but answer different questions, and mixing them up gives a misleading number.
Percentage change asks: how much did a value move from a known starting point? It divides by the original (or reference) value, so the answer is directional — positive for an increase, negative for a decrease. Use it for before-and-after comparisons: sales this quarter vs last quarter, today’s temperature vs yesterday’s, a price after a discount.
Percentage difference asks: how far apart are two equivalent things? It divides by the average of both, so neither is privileged as the baseline. Use it when the two values are peers — two independent measurements of the same quantity, two products at comparable price points, two survey responses.
The practical test: if swapping A and B would feel wrong (because one is clearly “the before”), use percentage change. If swapping them makes no difference to the meaning, use percentage difference.
Worked comparison
A sensor reads 48 and the reference instrument reads 52. There is no “original”; both are present-tense measurements of the same thing. Percentage difference is the right tool:
|48 − 52| ÷ ((48 + 52) ÷ 2) × 100 = 4 ÷ 50 × 100 = 8%
If you had instead used percentage change from 48 to 52, you would get
(52 − 48) ÷ 48 × 100 ≈ 8.33%. The difference is small here, but grows when
the two values are far apart, which is exactly when it matters most.
Edge case: what happens when both values are zero?
If A and B are both zero, the average is zero and the formula requires dividing by zero — the result is undefined. The calculator handles this by returning 0% when both inputs are zero (no difference) rather than throwing an error, since two identical values at any magnitude always have a 0% difference.