Fixing the #NUM! Error in Google Sheets: A Practical Guide

beginner📗 Google Sheets2026-06-09| Google Sheets (All Browsers, Desktop/Mobile)

Error Message

#NUM!
#google-sheets#troubleshooting#formulas

The Fast Fix

The #NUM! error usually pops up for two reasons: your formula is asking for impossible math, or the result is too massive for Google Sheets to handle. To clear it quickly, check these common culprits:

  • Impossible Math: You cannot find the square root of a negative number or the logarithm of zero. Use =SQRT(ABS(A1)) to avoid this.
  • DATEDIF Sequence: This function breaks if your start date is newer than your end date. Flip them around.
  • Financial Logic: Functions like IRR need at least one negative and one positive value in the range. If all your numbers are positive, the math fails.

What exactly is a #NUM! error?

Think of #NUM! as the spreadsheet’s way of saying: "I see your numbers, but the math doesn't check out." It differs from a #VALUE! error. While #VALUE! happens when you try to add a number to a word like "Apple," #NUM! acknowledges that you provided numeric data, but the specific operation is invalid.

1. Mathematical Limits and "Imaginary" Results

Most standard spreadsheet functions only work with real numbers. If a calculation results in an imaginary number, Google Sheets stops the process. For example, =SQRT(-16) will always trigger #NUM! because the square root of a negative number doesn't exist in standard arithmetic.

2. Numbers That Are Too Big

Google Sheets has a technical ceiling. It can handle numbers up to roughly 1.79 x 10^308. If you try to calculate something like =2^1024, the cell will display #NUM! because the result exceeds the software's memory capacity. Similarly, extremely small numbers (close to zero) can sometimes cause "underflow" issues.

3. Financial Formulas and Iteration

Functions like IRR (Internal Rate of Return) or RATE don't find an answer instantly. They use a trial-and-error approach called iteration. They start with a guess and refine it over and over. If the formula goes through 100 cycles without finding a stable result, it gives up and throws the error. This often happens if your cash flow data is logically impossible, such as a project that has costs but never earns any revenue.

4. The DATEDIF "Start vs. End" Problem

The DATEDIF function is a legacy tool that is notoriously picky. It calculates the time between two dates, but it only works in one direction. If you try to find the days between today and yesterday using =DATEDIF(TODAY(), TODAY()-1, "D"), it will fail.

How to Fix It

Method 1: Sanitize Your Inputs

If your data source is messy, your formulas need to be more resilient. Use the ABS() (absolute value) function to ensure numbers stay positive where required. Alternatively, wrap your formula in a logical check.

// This prevents errors by checking if the value is positive first
=IF(A1 > 0, LOG(A1), "Input must be > 0")

// This forces the number to be positive
=SQRT(ABS(A1))

Method 2: Bulletproof Your DATEDIF Formulas

When calculating age or tenure, you can't always guarantee which date column was filled out correctly. Use MIN and MAX to ensure the smaller date always comes first in the sequence.

// This works even if the dates in A1 and B1 are swapped
=DATEDIF(MIN(A1, B1), MAX(A1, B1), "D")

Method 3: Adjust Iteration Settings

If your complex financial models are failing, you might need to give Google Sheets more "room" to think. You can increase the calculation limits manually:

  • Open File > Settings.
  • Select the Calculation tab.
  • Toggle Iterative calculation to On.
  • Set the Max number of iterations to 1,000. This gives functions like IRR ten times more attempts to find a solution than the default setting.

Method 4: Use IFERROR for Clean Reports

Sometimes, a #NUM! error is expected in a large dataset (like calculating the growth rate of a brand-new company with no history). If you want to keep your dashboard looking clean, wrap the formula to show a dash or a zero instead.

=IFERROR(IRR(B2:B20), "Calculation Pending")

How to Verify the Fix

To make sure the error is truly gone, test the boundaries of your data. If you fixed a DATEDIF error, try entering a date from 1900 and a date from 2099 to see if the logic holds. For financial functions, try adding a "guess" argument (like 0.1 for 10%) as the second part of the IRR formula. If the error disappears once you provide that hint, the issue was simply that the math was too complex for the default settings.

Related Error Notes