FP

FormulaPilot

Spreadsheet formula tools

Open generator
Formula error

#DIV/0!

#DIV/0! Error in Excel — Causes & Fixes

Excel returns #DIV/0! whenever a formula attempts to divide by zero or by an empty cell.

Why this happens

Common causes of #DIV/0!

1

Explicit division by zero

=A1/0 or =A1/B1 where B1 contains 0 will always return #DIV/0!.

2

Dividing by an empty cell

An empty denominator is treated as zero. =A1/B1 returns #DIV/0! when B1 is blank.

3

Percentage or ratio calculations on zero totals

=A1/SUM(B1:B10) returns #DIV/0! if the sum of B1:B10 is zero — common in month-start reports before any data has been entered.

4

AVERAGE on an empty range

=AVERAGE(A1:A10) returns #DIV/0! when the range is empty because there are zero values to divide by.

How to fix it

Step-by-step fixes for #DIV/0!

1

Wrap in IFERROR

=IFERROR(A1/B1,0) returns 0 instead of #DIV/0!. Use "" to return a blank, or a custom message like "No data yet".

2

Guard with an IF check

=IF(B1=0,"",A1/B1) skips the division entirely when the denominator is zero. This is more explicit than IFERROR.

3

Use IF(ISBLANK) for empty cells

=IF(ISBLANK(B1),"",A1/B1) specifically handles the case where the denominator cell has not been filled in yet.

Frequently asked questions

Should I use IFERROR or IF to fix #DIV/0!?

Use IF when you want to be explicit about handling zero denominators and have the formula logic be visible. Use IFERROR when you want a catch-all for any error — including future errors you have not anticipated.

Why does my AVERAGE formula return #DIV/0!?

AVERAGE divides the sum by the count of numeric values. If the range contains no numbers (all blank or all text), the count is zero and Excel returns #DIV/0!. Use =IFERROR(AVERAGE(A1:A10),0) to return 0 when the range is empty.

Related function references

These functions appear most often in formulas that produce #DIV/0!.

Other Excel errors