Percentage Difference in Excel and Google Sheets
On this page
Direct answer
With values in A2 and B2, use =IF(AND(A2=0,B2=0),0,ABS(A2-B2)/((ABS(A2)+ABS(B2))/2)) and format the result as a percentage.
Formula and method
=IF(AND(A2=0,B2=0),0,ABS(A2-B2)/((ABS(A2)+ABS(B2))/2))
This page must show the formula exactly as the calculator or worked method uses it. Inputs remain unrounded during the calculation; rounding applies only to the displayed answer unless a domain-specific rule requires otherwise.
Step-by-step calculation
- Enter comparable values in A2 and B2.
- Use ABS for the gap and magnitudes.
- Branch the identical-zero case explicitly.
- Format the result cell as a percentage.
Worked examples
48 and 60
The formula returns 0.222222…, displayed as 22.22%.
−10 and −12
It returns 0.181818…, displayed as 18.18%.
0 and 0
The IF branch returns 0 instead of DIV/0.
Interpretation and edge cases
- Do not multiply by 100 if using percentage formatting.
- If your organization uses a different denominator, encode and document that policy instead.
- The zero branch is a convention and should be visible in methodology.
Frequently asked questions
Does the formula work in Sheets?
Yes.
Can I omit ABS around A2 and B2?
Not if you want CalculatorGeek's average-magnitude convention for negative values.
Why use an IF branch?
The raw formula is 0/0 when both inputs are zero.
Sources and transparency
The formulas and examples were evidence-checked on 2026-09-10. This is educational mathematical content. It does not replace a field-specific standard, accounting policy, laboratory method, contractual definition or professional judgment. CalculatorGeek should display a named human reviewer only after a real reviewer has completed and documented that review.
Use this resource
Keep exploring