When Google Sheets displays #DIV/0! divide by zero, Mathematical division cannot be evaluated when the divisor (denominator cell) equals 0 or is empty (which Google Sheets coerces to 0). Functions like AVERAGE, AVERAGEIF, and conversion-rate ratios also return #DIV/0! when zero matching numeric cells exist.
Step-by-Step Resolution
- Wrap the division expression in IFERROR to substitute a clean fallback value when empty or zero: =IFERROR(A2/B2, 0) or =IFERROR(A2/B2, "").
- Alternatively use an explicit denominator guard for zero checks while letting other formula errors surface: =IF(N(B2)=0, 0, A2/B2).
- For AVERAGE / AVERAGEIFS returning #DIV/0! on filtered empty datasets, wrap in =IFERROR(AVERAGEIF(...), "").
- When dragging division inside ARRAYFORMULA across blank future rows, guard empty rows cleanly: =ARRAYFORMULA(IF(B2:B=0, "", A2:A/B2:B)).
Common Edge Cases
Even a denominator cell containing the hidden text "0" or a space may evaluate as zero or #VALUE!; wrap numeric denominators with VALUE() if imported as text.
When This Doesn't Work
Avoid blindly wrapping complex lookup sheets in IFERROR(..., 0) if #REF! or #NAME? errors could also occur and get masked—prefer explicit IF(B2=0, 0, ...) guards on financial sheets.
Prevention Tips
Build division KPIs (CTR, CPA, Margin %) with built-in zero-denominator IF guards from day one before sharing dashboards.
Relevant Tools & Guides
- Google Ads ROI & ROAS Calculator — Calculate Return on Ad Spend (ROAS), break-even targets, CPA, and net profitability for Google Ads campaigns.
- Read Google Sheets Formulas Every Business User Should Know in 2026 →
- Read Looker Studio Dashboard Guide: Build Interactive Business Intelligence Reports →
Related Errors
Frequently Asked Questions
Should I use IFERROR or IF(B2=0) to handle #DIV/0!?
IF(B2=0, 0, A2/B2) is safer in financial models because it handles zero divisors specifically without hiding unrelated #REF! or #NAME? errors.
Why does AVERAGE give #DIV/0! when cells look filled?
Cells formatted as Plain Text (including imported numbers stored as text strings) are ignored by AVERAGE, leaving zero numeric values to average.
Can #DIV/0! break downstream SUM formulas?
Yes. A single #DIV/0! cell inside a summed column propagates #DIV/0! to every total, chart, and Looker Studio scoreboard referencing it.
How do I fix #DIV/0! across an entire column without dragging?
Use =ARRAYFORMULA(IF(B2:B="", "", IF(B2:B=0, 0, A2:A/B2:B))).