Excel #DIV/0! error
A plain-words explanation of this Excel message: what it means, the usual causes, and the steps that fix it.
The message#DIV/0!
Make the error yourself
Typed into Microsoft Excel 16.0 build 20326. This is the smallest example we could find that shows it.
| Cell | What was typed |
|---|---|
| A1 | 100 |
| A2 | 0 |
| B1 | =A1/A2 |
The cell looked at: B1.
Excel shows: #DIV/0!
Why it happens
Excel shows #DIV/0! when a formula divides by zero or by an empty cell, since an empty cell counts as zero in a division. In the example the cell A2 holds 0. Typical real causes: a percentage or an average with a total that is still empty, a column that is filled in later, an AVERAGE of cells that are all empty or text, and a lookup that returns 0 or nothing.
How to fix it
- Click the cell and use Formulas > Evaluate Formula, or select the divisor part in the formula bar and press F9 to see its value (press Esc afterwards to undo).
- Decide what you want when the divisor is zero. Leave the cell empty:
=IF(A2=0,"",A1/A2). - Or hide any error with
=IFERROR(A1/A2,0). Use it with care, because it also hides other errors that you may want to see. - If the divisor should not be zero, fix the data that makes it zero.
The corrected version
| Cell | What was typed |
|---|---|
| A1 | 100 |
| A2 | 0 |
| B1 | =IF(A2=0,"",A1/A2) |
The cell looked at: B1.
Excel shows: (an empty cell: nothing is shown)
How to avoid it
Fill the input cells first, or protect formulas with IF for the empty case. Use IFERROR only for the specific case you expect.
Questions
Why does AVERAGE show #DIV/0!?
AVERAGE divides the sum by the count of numbers. If no cell in the range holds a number, the count is zero.
This is an independent guide. It is not connected with Python, Microsoft, Google, GitHub or the Git project. Product names belong to their owners. Examples were run on 13 November 2026 in a practice folder or a blank workbook; your version may word a message slightly differently.