#NUM! in Excel: what it means and how to fix it
#NUM! means a calculation doesn't produce a valid number, such as the square root of a negative number or a result that's too large.
Start practising hereIn the lesson Order of operations and brackets, free
What does #NUM! mean?
#NUM! means that a calculation doesn't produce a valid number. Excel can read the formula, but the result doesn't exist or is too large.
The best-known cause is the square root of a negative number: =SQRT(-16) has no result. You also get the error if you ask for something that isn't there, such as the fifth-largest value in a list of four numbers, or if the start date in DATEDIF is after the end date.
When do you get #NUM!?
How to fix #NUM!, step by step
This is how to fix the error:
- Click the cell with #NUM! and look in the formula bar to see which function and which cells the formula uses.
- Check the numbers: is there a negative number where that's not possible, such as in SQRT? Remove the minus sign with ABS, if that's what you intend.
- If you're asking LARGE or SMALL for a place, check that the list actually contains that many numbers.
- With DATEDIF, the earlier date has to come first. Swap the two dates.
Examples
The square root of a negative number
C1 contains =SQRT(A2). A negative number has no square root, so Excel gives #NUM!.
Fixed with ABS
C1 contains =SQRT(ABS(A2)). ABS first removes the minus sign: the square root of 16 is 4. Only do this if the minus sign really doesn't matter.
A place that doesn't exist
C1 contains =LARGE(A2:A5,5). There are only four scores in the list, so a fifth-largest doesn't exist. With 1 to 4, it works.
Where it often goes wrong
Practise this in the lesson Order of operations and brackets. It's free.
Frequently asked questions
Can I hide #NUM! with IFERROR?
You can, but first find out why the calculation fails. Often one of the cells holds the wrong number.