The #DIV/0! error means a formula is trying to divide by zero — or by an empty cell, which Excel treats as zero. It's mathematically impossible, so Excel flags it. The fix is simple once you know the pattern.
What #DIV/0! means
Division by zero is undefined in mathematics, so any formula that attempts it returns #DIV/0!. The tricky part is that an empty cell counts as zero for division, so you get this error even when there's no visible zero — just a blank.
The common causes
Dividing by an empty cell. =A1/B1 returns #DIV/0! if B1 is blank. This is extremely common in templates where data hasn't been entered yet.
Dividing by a literal zero. =A1/0 or dividing by a cell that genuinely contains 0.
AVERAGE on an empty range. AVERAGE divides by the count of numbers, so averaging a range with no numbers returns #DIV/0!.
Percentage and ratio calculations where the denominator can legitimately be zero — like calculating a completion rate before anything's been assigned.
How to fix it
The clean fix: IFERROR. Wrap the division and specify what to show when the denominator is zero:
=IFERROR(A1/B1, 0)
This shows 0 (or whatever you choose) instead of the error. Use "" for a blank-looking cell.
The precise fix: check the denominator with IF. This only catches division-by-zero, letting other errors surface:
=IF(B1=0, 0, A1/B1)
This says: if B1 is zero (or empty, which equals zero), return 0; otherwise do the division. It's more targeted than IFERROR because it won't accidentally hide unrelated errors.
Which to use: IF-checking the denominator is generally the better practice because it's specific — it handles exactly the divide-by-zero case and lets genuine errors (like #VALUE! from bad data) still show up. IFERROR is quicker but broader.
For AVERAGE errors
If AVERAGE returns #DIV/0! on an empty range, wrap it:
=IFERROR(AVERAGE(A1:A10), 0)
Or use AVERAGEIF to only average cells meeting a condition, which sidesteps empty-range issues.
Deciding what to show
Think about what makes sense for your data:
- 0 — when zero is a meaningful result.
- Blank (
"") — when you want empty cells to look empty until data arrives. - A message like
"No data"— when you want to make the missing-denominator situation visible.
The takeaway
#DIV/0! is straightforward: a formula is dividing by zero or an empty cell. Decide what should appear when the denominator is zero, then use =IF(denominator=0, alternative, division) for a precise fix or IFERROR for a quick one. It's one of the easiest Excel errors to handle cleanly.