ExcelReady
CourseFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before the interview. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Function guides
  • Blog

Product

  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Errors & fixes
  3. #NUM! Error in Excel

#NUM! Error in Excel

By ExcelReady Team·Updated October 30, 2026·6 min read

The short answer

#NUM! means a formula asked for a calculation that can't give a valid number. The most common causes are DATEDIF with the start date after the end date, LARGE or SMALL asking for a position beyond the number of values, the square root of a negative number, and results too big for Excel. Fix the input, such as swapping the dates.

Key takeaways

  • #NUM! means the formula's numbers are impossible for that function, not that the formula is mistyped.
  • DATEDIF returns #NUM! when the start date is later than the end date; put the earlier date first.
  • LARGE(range,k) and SMALL(range,k) return #NUM! when k is bigger than the count of numbers, or less than 1.
  • SQRT of a negative number, and results beyond about 1E+308, also give #NUM!.
  • Financial functions like IRR and RATE return #NUM! when they can't find an answer; try a guess value.
On this page+
  1. What does #NUM! mean in Excel?
  2. Cause 1: DATEDIF with the dates the wrong way round
  3. Cause 2: LARGE or SMALL asks for too many values
  4. Cause 3: impossible math
  5. Cause 4: IRR, RATE and other functions that search for an answer
  6. Find every #NUM! error in a sheet
  7. How to fix #NUM! errors: a checklist
  8. Practise it

A #NUM! error in Excel means your formula asked for a calculation that has no valid numeric answer. The formula is typed correctly, but a number going into it is impossible for that function: a start date after an end date, a "6th largest" value in a list of five, or the square root of a negative number. This guide covers the common causes and the fix for each.

What does #NUM! mean in Excel?#

#NUM! is Excel's "this number doesn't work here" error. The function understands what you asked; it just can't produce a valid number from the inputs.

That separates it from similar errors:

ErrorWhat's wrong
#NUM!The value is a number, but an impossible one for this calculation
#VALUE!The value is the wrong type, like text instead of a number
#DIV/0!The formula divides by zero
#NAME?Excel doesn't recognise a word in the formula

Because the cause is an input, the fix usually means correcting the data or guarding against it, not retyping the function.

Cause 1: DATEDIF with the dates the wrong way round#

DATEDIF counts the whole years, months or days between two dates. Its arguments are =DATEDIF(start_date, end_date, unit), and the start date must come first. If it's later than the end date, DATEDIF returns #NUM!.

ABCD
1EmployeeHire DateReview DateYears
2Ines Moreau3/4/20199/30/2024#NUM!

The broken formula:

Excel formula
=DATEDIF(C2,B2,"Y")

C2 (2024) is later than B2 (2019), so the order is wrong. Swap them:

Excel formula
=DATEDIF(B2,C2,"Y")

The result is 5: Ines has worked five full years. The mix-up is easy to make because the similar DAYS function takes the dates the other way round: =DAYS(end_date, start_date). Our guide to days between two dates compares the two, and the DATEDIF function guide lists every unit.

If some rows might genuinely have the dates reversed, you can make the formula order-proof:

Excel formula
=DATEDIF(MIN(B2,C2),MAX(B2,C2),"Y")

But in HR data, a review before the hire date usually means a typing mistake, so it's often better to let the error show and fix the date. Tenure and age calculations like these come up constantly in Excel skills for HR and recruiting jobs.

A related point: DATEDIF doesn't appear in Formula AutoComplete or the Insert Function list in Excel, even though it works. Type it in full.

Cause 2: LARGE or SMALL asks for too many values#

=LARGE(range, k) returns the k-th largest number. If k is larger than the number of numbers in the range, or less than 1, there's nothing to return, so you get #NUM!.

AB
1RepSales
2Priya48,200
3Tom39,150
4Ana61,400
5Kenji(empty)
6Leila33,700

=LARGE(B2:B6,5) returns #NUM!: the range has five cells but only four numbers, because LARGE skips empty cells and text. =LARGE(B2:B6,4) works and returns 33,700.

When a top-N list must cope with short lists, guard it with COUNT:

Excel formula
=IF(COUNT(B2:B6)>=5,LARGE(B2:B6,5),"")

SMALL behaves the same way. See our guide to finding the top 3 with LARGE and SMALL for ranking patterns.

Cause 3: impossible math#

Some calculations simply have no real-number answer:

  • Square root of a negative number: =SQRT(-16) returns #NUM!. If you only need the size of the number, use =SQRT(ABS(A2)). If a negative input means bad data, fix the data.
  • A result that's too big: Excel handles numbers up to about 1.8E+308. =10^309 or a growth formula compounding over thousands of periods returns #NUM!.
  • Negative or zero logarithms: =LN(0) and =LOG(-5) return #NUM!.

Cause 4: IRR, RATE and other functions that search for an answer#

Finance functions like IRR and RATE don't calculate directly; they try values until they find one that fits. If they can't find a fit in their attempts, they return #NUM!.

Common reasons are cash flows that are all positive or all negative (there must be at least one of each for IRR), or a starting point far from the real answer. Check the signs of your cash flows first, then add a guess argument close to the answer you expect, such as =IRR(B2:B8,10%).

Find every #NUM! error in a sheet#

In a large sheet, let Excel collect the errors for you. Press Ctrl+F (⌘F on a Mac), type #NUM!, click Options, set Look in to Values and click Find All. Each cell in the list currently shows the error, and clicking one selects it.

Often the errors share one cause. In a tenure column, for example, every #NUM! row may be a person whose review date hasn't been entered yet or was typed in the wrong year. Sorting the column so the errors sit together makes the pattern easy to spot. Then decide whether to fix the data or guard the formula.

How to fix #NUM! errors: a checklist#

  1. Click the cell and read the formula. Identify which function produced the error.
  2. Check each input. Are dates in the right order? Is the k value within the count of numbers? Is any number negative where it shouldn't be?
  3. Use Evaluate Formula (click the warning icon, then Show Calculation Steps) for long formulas, to see which part fails.
  4. Fix the data if it's wrong; guard the formula if the situation is legitimate.
  5. Use IFERROR only for expected cases, such as =IFERROR(DATEDIF(B2,C2,"Y"),"") while review dates are still being entered.

Two other problems sometimes show up next to #NUM! in date work: a column too narrow for its dates, which displays ##### (see why Excel shows ##### in a cell), and formulas that refer back to their own cell (see circular reference warnings).

Practise it#

Fix the DATEDIF formula in the exercise on this page. Then practise days between dates with DAYS and DATEDIF in a live spreadsheet, and the LARGE and SMALL lesson to find top and bottom values without errors.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

D2 should show how many full years Ines has worked, but =DATEDIF(C2,B2,"Y") returns #NUM!. Fix it in D2: DATEDIF needs the earlier date (the hire date in B2) first, then the review date in C2.

fx
ABCDE
1
Employee
Hire Date
Review Date
Years
2
Ines Moreau
43528
45565
3
Ravi Shah
44396
45565
4
Hana Kim
42675
45565
5
6
7

Tip: DATEDIF(start_date, end_date, unit): the earlier date goes first.

Practise this in a lesson

LessonDays between dates: DAYS, DATEDIF and TODAYMeasure the gap between two dates in days, months and years, and calculate tenure as of today.LessonLARGE and SMALLFind the second-highest, top 3 or second-lowest value, a favorite interview question.Function guideDATEDIFCalculate tenure, age and contract length with DATEDIF. Learn every unit (Y, M, D, YM), the hidden-function quirks, and practice live.

Frequently asked questions

What does #NUM! mean in Excel?

+

It means a function received a number it can't work with, or the result can't be calculated. Examples are a negative square root, a start date after an end date, or a result too large for Excel.

Why does DATEDIF return #NUM!?

+

The start date is later than the end date. DATEDIF needs the earlier date first: =DATEDIF(start_date, end_date, "Y").

Why does LARGE return #NUM!?

+

The k value is bigger than the number of numeric cells in the range, or it's 0 or negative. LARGE(B2:B6,6) fails because B2:B6 holds only five numbers.

How is #NUM! different from #VALUE!?

+

#VALUE! means a value is the wrong type, like text where a number belongs. #NUM! means the value is a number, but an impossible one for that calculation.

How do I hide #NUM! errors?

+

Fix the input if you can. If the error is expected, for example rows where a date is still missing, wrap the formula in IFERROR to show a blank or a message.

Sources

  • How to correct a #NUM! error - Microsoft Support
  • DATEDIF function - Microsoft Support
  • LARGE function - Microsoft Support

Written and checked by the ExcelReady Team. First published October 30, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does #NUM! mean in Excel?
  2. Cause 1: DATEDIF with the dates the wrong way round
  3. Cause 2: LARGE or SMALL asks for too many values
  4. Cause 3: impossible math
  5. Cause 4: IRR, RATE and other functions that search for an answer
  6. Find every #NUM! error in a sheet
  7. How to fix #NUM! errors: a checklist
  8. Practise it

Keep reading

Errors & fixes· 5 min read

Why Excel Shows ##### in a Cell

Excel shows ##### when a number, date or time is too wide for its column. Double-click the right edge of the column header to widen it, and the value appears. If ##### stays however wide the column is, the cell holds a negative date or time, such as an end time before a start time. Fix that formula instead.

Errors & fixes· 5 min read

Circular Reference Warning in Excel: Find and Fix It

A circular reference is a formula that refers to its own cell, directly or through other cells, such as =SUM(B2:B8) typed in B8. To find it, go to Formulas > Error Checking > Circular References, or read the status bar. Fix it by changing the range so it stops before the formula's cell, here =SUM(B2:B7).

Tests & careers· 5 min read

Excel Skills for HR and Recruiting Jobs

The most useful Excel skills for HR and recruiting are counting headcount with COUNTIFS, totalling payroll with SUMIFS, calculating tenure and time to hire with DATEDIF, TODAY and date subtraction, looking up employee records with XLOOKUP or VLOOKUP, flagging eligibility with IF and AND, and cleaning names and dates so reports stay accurate.

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback. The first lessons are free, with no download.

Start learning for free