Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

Percent Difference
40%
relative to the average of the two values
Absolute difference |a − b| 20
Average (a + b) / 2 50

What Is Percent Difference?

Percent difference measures how far apart two values are, relative to their average. Unlike percent change, it does not treat either value as the "starting point" — both are weighted equally. This makes it ideal for comparing two measurements where neither is more correct than the other, such as two lab readings, two prices, or two experimental results.

How to Use This Calculator

Enter your two values, a and b, in any order. The calculator computes the absolute difference, divides it by the average of the two numbers, and multiplies by 100 to express the result as a percentage. The answer is always positive because the absolute value removes direction.

The Formula Explained

The percent difference formula is:

$$\text{Percent Difference} = \frac{\left| \text{a} - \text{b} \right|}{\left| \dfrac{\text{a} + \text{b}}{2} \right|} \times 100\%$$

The numerator \(|a - b|\) is the gap between the two values. The denominator \((a + b) / 2\) is their average, which serves as a neutral reference. Multiplying by 100 converts the ratio into a percentage.

Advertisement
Diagram showing two values a and b, their absolute difference, and the average used as the denominator
Percent difference divides the absolute difference of two values by their average.

Worked Example

Suppose a = 40 and b = 60. The absolute difference is \(|40 - 60| = 20\). The average is \((40 + 60) / 2 = 50\). So $$\%\text{diff} = \frac{20}{50} \times 100 = 40\%$$ The two values differ by 40% relative to their average of 50.

Number line showing two points a and b with their midpoint average marked between them
The average of the two values sits at the midpoint on a number line.

FAQ

Is percent difference the same as percent change? No. Percent change uses one value as a baseline (it can be negative), while percent difference uses the average of both and is always positive.

What if one value is zero? If both values are zero the average is zero and the result is undefined; this tool returns 0 in that case. With one zero, the percent difference will be a large but valid number.

Can the result exceed 100%? Yes. When values have opposite signs or one is far larger than the other, percent difference can exceed 100%.

Last updated: