In Excel: a formula attempts to divide by zero or by an empty cell — guard it with =IFERROR(A1/B1, 0) or =IF(B1=0, 0, A1/B1) to return a safe result when the denominator is missing.
Fix:#DIV/0!
What causes #DIV/0!
#DIV/0! means "division by zero." Excel raises it whenever a division operation has a zero or blank denominator — mathematically undefined and impossible to compute. The most common triggers are: (1) dividing a value by a cell that is empty (Excel treats blank as zero); (2) a formula that calculates a ratio where the base metric is zero (e.g. dividing actual sales by budgeted sales when the budget is 0); (3) AVERAGE() on a range that contains no numeric values (AVERAGE divides the sum by the count; if count is 0 the result is #DIV/0!). It also surfaces in array formulas and dynamic arrays when some rows have zero denominators.
How to fix #DIV/0!
- Identify the denominator in the formula — the value after the / operator.
- Check whether the denominator cell is blank or zero: click it and look at the formula bar. An empty cell is shown as blank; a zero appears as 0.
- If the zero is a data-entry mistake, correct the value in the denominator cell.
- If zeros or blanks are legitimate (future periods, optional fields), guard the division:
=IF(B1=0, 0, A1/B1)or=IFERROR(A1/B1, 0). - For
AVERAGEon a dynamic range, use=IFERROR(AVERAGEIF(range, "<>0"), 0)to skip zeros. - To find all
#DIV/0!cells at once, use Home ▸ Find & Select ▸ Go To Special ▸ Formulas ▸ Errors.
Identify the denominator in the formula — the value after the / operator.
Check whether the denominator cell is blank or zero: click it and look at the formula bar. An empty cell is shown as blank; a zero appears as 0.
If the zero is a data-entry mistake, correct the value in the denominator cell.
If zeros or blanks are legitimate (future periods, optional fields), guard the division: =IF(B1=0, 0, A1/B1) or =IFERROR(A1/B1, 0).
For AVERAGE on a dynamic range, use =IFERROR(AVERAGEIF(range, "<>0"), 0) to skip zeros.
To find all #DIV/0! cells at once, use Home ▸ Find & Select ▸ Go To Special ▸ Formulas ▸ Errors.
What this does
#DIV/0! means "division by zero." Excel raises it whenever a division operation has a zero or blank denominator — mathematically undefined and impossible to compute. The most common triggers are: (1) dividing a value by a cell that is empty (Excel treats blank as zero); (2) a formula that calculates a ratio where the base metric is zero (e.g. dividing actual sales by budgeted sales when the budget is 0); (3) AVERAGE() on a range that contains no numeric values (AVERAGE divides the sum by the count; if count is 0 the result is #DIV/0!). It also surfaces in array formulas and dynamic arrays when some rows have zero denominators. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “remove #div/0 in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When this is a ribbon command, the selection matters more than the button: confirm the range, apply the command, then spot-check the output before saving. The point is a data step that keeps your analysis trustworthy, but the practical win is that someone else can open the file and understand what happened without asking you.
A worked example
Scenario: you are computing a profit margin with =C2/B2 where B2 is revenue. In rows where revenue has not yet been entered, B2 is blank, and the formula returns #DIV/0!. To diagnose: check whether the denominator (B2) is zero or empty. To fix immediately: use =IF(B2=0, "", C2/B2) — this returns empty instead of an error when revenue is zero. For a cleaner pattern, wrap in IFERROR: =IFERROR(C2/B2, 0). If the blank is intentional (the row represents future periods), use =IF(B2="", "", C2/B2) to leave the cell empty rather than showing a misleading 0%. Guard every division formula proactively, especially in templates where some rows represent future periods. A single unguarded =A1/B1 in a template copied down 100 rows will generate 100 #DIV/0! errors the moment the template is used with incomplete data — catching it at design time costs one IF or IFERROR; fixing it after the fact requires touching every cell. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “remove #div/0 in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.
Common mistakes
- Using
=IFERROR(A1/B1, "")when a zero result is more appropriate — an empty cell looks like missing data, while returning 0 (or "N/A") communicates that no meaningful ratio exists. - Forgetting that
AVERAGE()on an all-blank or all-text range divides by zero internally — use=IFERROR(AVERAGE(range), 0)as a standard safeguard. - Building a percentage column without guarding the denominator, then sorting the column —
#DIV/0!sorts after all numeric values in ascending mode, pushing error rows to unexpected positions.
Frequently asked questions
Why does #DIV/0! appear when I divide by a cell that looks empty, not zero?
Excel treats a blank cell as zero in arithmetic operations. So =A1/B1 where B1 is empty is exactly the same as =A1/0, which is undefined. Use =IF(B1="", "", A1/B1) to return empty when the denominator is blank.
What is the difference between IF and IFERROR for handling #DIV/0!?
IF(B1=0, fallback, A1/B1) prevents the error before it happens by checking the denominator first — it is the more explicit approach. IFERROR(A1/B1, fallback) lets the formula run and catches any error that results — faster to write but catches all errors, not just division by zero. For precise control, use IF; for brevity, use IFERROR.
Can #DIV/0! propagate into other formulas?
Yes. Any formula that references a cell containing #DIV/0! will also return #DIV/0! (or another error). This cascade means a single unguarded division formula can break an entire report. Guard every division at the source, not at the aggregation level.
Other ways people ask this
This is also commonly searched as “how to remove #div/0 in excel”, “#div/0 excel remove”, “remove #div/0 from excel” and “excel remove #div/0”. They describe the identical operation, so you are in the right place no matter how you phrased it.
Why do people search for this in so many different ways?
Because the same task has many names. “how to remove #div/0 in excel”, “#div/0 excel remove”, “remove #div/0 from excel” all point at the one operation explained on this page, which is why they all lead here.