Excel guide · 4 min read
How to fix the #CALC! error in Excel
=FILTER(A2:A7,B2:B7=F2,"No tickets"). Less often, #CALC! comes from a LAMBDA that is never called, or from BYROW or MAP returning more than one value per row. #CALC! exists only in Excel 365 and Excel 2021 or later.Sample data
Every result on this page was calculated from this sheet by the same spreadsheet engine the Cellwise app uses.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Ticket | Team | Status | Hours | Team | |
| 2 | T-501 | Support | Open | 3 | Billing | |
| 3 | T-502 | Sales | Closed | 1.5 | ||
| 4 | T-503 | Support | Closed | 2 | ||
| 5 | T-504 | Onboarding | Open | 4 | ||
| 6 | T-505 | Sales | Open | 2.5 | ||
| 7 | T-506 | Support | Open | 1 |
Download this sheet as an Excel practice file (.xlsx)
The usual cause: FILTER found nothing
The sample sheet is a help-desk log. F2 holds the team to show, and a FILTER lists that team's tickets. With Support or Sales in F2 it spills the ticket numbers. Switch F2 to Billing, a team with no tickets yet, and the formula has nothing to return.
Excel cannot show "nothing" as a list, so it shows #CALC! instead. The formula is not broken. It is telling you the result is empty. The same happens when a criterion has a stray space: "Support " with a trailing space matches no row and also gives #CALC!.
Result: #CALC!
#CALC!, because no ticket belongs to Billing.
Fix 1: give FILTER an if_empty value
FILTER's third argument is what to show when nothing matches. Use a short message for a report, "" to leave the cell blank, or 0 when another formula will do maths on the result.
You can build the message from the input so readers know what was searched. If F2 might be empty, test it first: =IF(F2="","Pick a team",FILTER(A2:A7,B2:B7=F2,"No "&F2&" tickets")) shows Pick a team until someone chooses one.
Result: No Billing tickets
No Billing tickets. With Support in F2 it spills T-501, T-503 and T-506.
When FILTER sits inside SUM, COUNTA, UNIQUE or SORT
#CALC! passes straight through any function wrapped around an empty FILTER. SUM(FILTER(...)), MAX(FILTER(...)), ROWS(FILTER(...)) and UNIQUE(FILTER(...)) all return #CALC! for Billing. Give the FILTER inside its own if_empty argument, so the outer function never receives an empty array.
Pick the if_empty value for the outer function. For SUM, use 0: the formula below returns 0 hours. For MAX, 0 is only safe when it cannot be mistaken for a real result; a message is clearer.
Counting is the trap. =COUNTA(FILTER(A2:A7,B2:B7=F2,"")) returns 1 for Billing, because COUNTA counts the "" as a value. Count with =IFERROR(ROWS(FILTER(A2:A7,B2:B7=F2)),0) instead, which returns 0. Or skip FILTER and use =COUNTIF(B2:B7,F2), which also returns 0.
Result: 0
0 hours for Billing, instead of #CALC!.
Other empty arrays: UNIQUE, TAKE and DROP
FILTER is not the only function that can end up with nothing. UNIQUE with its third argument set to TRUE returns only values that appear exactly once. On this sheet =UNIQUE(B2:B7,,TRUE) returns Onboarding, the only team with a single ticket. If every value repeated, it would return #CALC!.
TAKE and DROP do the same at the edges: DROP that removes every row, or TAKE with 0 rows, has nothing left and returns #CALC!. When the number of rows comes from another cell, check it can never reach the size of the data.
Result: Onboarding
Onboarding, the only team that appears once.
Nested arrays and LAMBDA
The second family of #CALC! causes comes from Excel 365's LAMBDA helpers. BYROW and MAP expect one value per row or per item. If the LAMBDA returns a whole list for each one, for example a FILTER of each team's tickets, Excel cannot fit a list inside a single cell of the result and shows #CALC!. Make the LAMBDA return one value, such as a SUM or a TEXTJOIN of the list, or build the full list with a single FILTER instead.
A LAMBDA typed into a cell on its own, such as =LAMBDA(x,x*2), also shows #CALC!, because it defines a function but never runs it. Add the argument in brackets to test it, =LAMBDA(x,x*2)(5), or save it as a name in Formulas > Name Manager and call it by that name.
#CALC! vs #SPILL!, #N/A, and IFERROR
#SPILL! means the formula has results but no empty room to show them. #CALC! means there are no results at all. #N/A is what lookups return when a single value is missing: =XLOOKUP(F2,B2:B7,A2:A7) gives #N/A for Billing, while SUMIFS for the same team quietly gives 0.
IFNA does not catch #CALC!. It only replaces #N/A, so the formula below still shows the error. IFERROR does catch it, but it also hides typos and #VALUE! from a broken condition. Prefer if_empty: it only covers "no matches" and leaves real mistakes visible.
Result: #CALC!
Still #CALC!, because IFNA only handles #N/A.
Common mistakes
Wrapping the whole formula in IFERROR
It hides every error, including a misspelled range or a bad condition. Use FILTER's if_empty argument for the empty case.
Counting FILTER results with COUNTA
An if_empty of "" counts as 1. Use IFERROR(ROWS(FILTER(...)),0), or COUNTIF/COUNTIFS for simple conditions.
Putting if_empty on the outer function
UNIQUE, SORT and SUM have no if_empty. Put it on the FILTER inside, so the error never starts.
#CALC! on rows you know exist
Look for trailing spaces or numbers stored as text in the criteria column. Compare with TRIM, or clean the column first.
FAQ
What does #CALC! mean in Excel?
It is a calculation error for results Excel cannot show, most often an empty array from FILTER, UNIQUE, TAKE or DROP. It can also come from a nested array in BYROW or MAP, or from a LAMBDA that is never called.
How do I make FILTER return blank instead of #CALC!?
Use "" as the third argument: =FILTER(A2:A7,B2:B7=F2,""). Remember that COUNTA then counts that blank as one value.
Why does IFNA not fix #CALC!?
IFNA only replaces #N/A. #CALC! is a different error, so use FILTER's if_empty argument, or IFERROR if you accept that it hides all errors.
Is #CALC! the same as #SPILL!?
No. #SPILL! means there are results but something is blocking the cells they need. #CALC! means there is nothing to show. Each has a different fix.
Why don't I see #CALC! in Excel 2019?
It only exists in versions with dynamic arrays, Excel 365 and Excel 2021 or later. Excel 2019 has no FILTER, so the same formula shows #NAME? there.
Functions used
FILTERKeeps matching rows, spillsIFNAFallback for #N/A onlyIFERRORFallback when a formula errorsUNIQUERemoves duplicates, spillsROWSNumber of rows in a rangeCOUNTACounts non-empty cellsCOUNTIFCounts cells that matchTAKEFirst or last rows, spillsDROPRemoves first or last rows, spillsXLOOKUPModern lookup in any direction
Related guides
- #SPILL! error in Excel
- How to filter with multiple criteria in Excel
- How to use IFERROR in Excel
- #N/A error in Excel: causes and fixes
- XLOOKUP not working: how to fix #N/A and wrong results
- How to calculate standard error in Excel
Updated