Calculate percent difference in Excel or Google Sheets
Copy a spreadsheet formula to compare pairs of measurements, check blank cells and zeros, and verify your results with worked examples.
Open the percent difference calculator →Enter the formula
Put the two measurements in A2 and B2, using the same unit for both. In C2 enter the formula below, format C2 as a percentage with two decimal places, and copy it down for the remaining pairs.
=IF(COUNT(A2:B2)<>2,"",IF(MIN(A2:B2)<0,"Check sign",IF(SUM(A2:B2)=0,"Undefined",ABS(A2-B2)/AVERAGE(A2:B2))))
The formula compares the gap between two measurements with their average. Percentage formatting supplies the factor of 100. With 24.5 and 25.5 grams, the gap is 1 gram and the average is 25 grams. The cell stores 0.04 and displays 4.00%. Swapping the two measurements gives the same result.
Check your worksheet
| A | B | Expected display |
|---|---|---|
| 80 | 100 | 22.22% |
| 100 | 80 | 22.22% |
| 75 | 75 | 0.00% |
| 0 | 10 | 200.00% |
| 0 | 0 | Undefined |
A missing reading leaves the result blank, so an unfinished row stays distinct from a measured zero. A negative input prompts a sign check because this worksheet uses the nonnegative measurement convention. If one value is a starting point and the other is an endpoint, use percent change instead. An increase from 80 to 100 is 25% relative to the starting value.