Google Sheets Divides by Zero: Handle Empty and Zero Denominators Deliberately
🔍 WiseChecker

Google Sheets Divides by Zero: Handle Empty and Zero Denominators Deliberately

A division error can come from a real zero denominator or from missing input that a formula treats as zero. Those states should not automatically produce the same report value.

ADVERTISEMENT

Inspect the denominator

For a ratio A2 divided by B2, check B2 directly. Is it an actual numeric zero, an empty cell, text, or an earlier calculation error? Confirm the units and the period represented by both inputs.

Keep missing observations distinguishable from genuine measured zeros. A rate calculated before its denominator arrives should not look like a completed zero-rate measurement.

Define explicit output behavior

For verified numeric inputs, =IF(B2=0,"Undefined",A2/B2) makes the zero-denominator case visible. If missing input needs a separate label, check it before the zero condition and retain a numeric-type check where the source can contain text.

This example uses English function names and comma argument separators. Adapt separators to the file’s locale. Choose labels that the people reading the report understand, and document whether downstream formulas should exclude those rows.

ADVERTISEMENT

Test ordinary and exceptional cases

Check 10 divided by 2, 10 divided by 0, and the actual missing-input representation used by the import. Also test a malformed text value rather than assuming every unexpected input is a zero.

A blanket IFERROR returning 0 can hide a broken reference, invalid text, or a missing denominator. Use it only when that broader behavior is intentional and reviewed. Verify aggregate rates from their appropriate totals instead of averaging labeled or selectively suppressed row-level ratios, since error handling should not silently redefine the population being measured.

References

Reviewed against the linked official product guidance on November 3, 2026. Features, limits, screen labels, and access can vary by account, platform, region, and organization policy.

ADVERTISEMENT