#DIV/0! error in Excel
Draft. The steps on this page have not been checked in desktop Excel yet.
#DIV/0! means a formula tried to divide by zero. Fix the divisor, or wrap the formula in IFERROR to show something else.
Part of the Formula basics guide.
Why it happens
Division by zero has no answer, so Excel returns #DIV/0! instead of a number.
How to fix it
Check the cell the formula divides by. If a zero there is expected, wrap the formula in IFERROR and give the value to show instead.
What Excel returns
We ran these in desktop Excel (build 16.0.20527) and recorded what each cell showed.
| Formula | Excel shows | Note |
|---|---|---|
=QUOTIENT(10,0) | #DIV/0! | Dividing by zero. |
=IFERROR(1/0,"err") | err | IFERROR swaps the error for the text you give it. |
Try it
Live grid coming soonYour turn: Change C2 so it shows 0 instead of the error.
A
B
C
D
1
Total
Count
Average
2
120
0
=A2/B2
3
Functions used
Functions that return #DIV/0!
Each of these returned #DIV/0! in at least one formula we ran in desktop Excel.
Part of the Formula basics guide.