How to fix the #DIV/0! error in Excel

What #DIV/0! actually means

Excel shows #DIV/0! when a formula divides by zero — or by an empty cell, because Excel treats a blank as zero in arithmetic. The math is undefined, so instead of a number you get an error, and every formula that reads that cell inherits it. It is usually the least mysterious Excel error: somewhere in the formula there's a division, and the denominator is zero or blank. The real question is why it's zero, and the right fix depends on the answer.

The most common causes

Step-by-step fix

  1. Find the denominator. Click the error cell and read the formula bar; the divisor is what matters. If it's another formula, Formulas → Trace Precedents follows the chain to the source.
  2. Decide: missing data or real bug? If zero just means "no data yet", the error is cosmetic and a guard is correct. If the denominator should never be zero, fix the upstream cell — don't hide it.
  3. Guard the division with IF. =IF(B2=0, "", A2/B2) shows a blank until data arrives. This is the precise fix: it handles exactly the case you understood.
  4. Use IFERROR sparingly. =IFERROR(A2/B2, "") is quicker to type, but it swallows every error — a future #REF!, #VALUE!, or misspelled name in that formula will vanish into the same blank. A targeted IF on the denominator is the safer habit; wrapping whole formulas in blanket IFERROR is how real mistakes hide in shipped spreadsheets.
  5. Sweep the sheet. F5 → Go To SpecialFormulasErrors selects every error cell at once, so you can fix a copied-down column in one pass.

Or let us find every one in seconds

Upload your workbook and we'll flag every #DIV/0! — and, just as important, the error-masking IFERROR wrappers and broken references hiding behind clean-looking cells.

Analyzing…

Analyzed in isolation. Deleted within minutes. Never used for training. — how it works

More fixes: run a full spreadsheet audit · fix the #REF! error · fix circular references