Summary
The #CALC! error occurs when a formula runs into a calculation error with an array. The #CALC! error is a "new" error in Excel, introduced with dynamic arrays. It will not appear in older versions of Excel.
Explanation
With the introduction of Dynamic Arrays in Excel formulas, there is more emphasis on arrays. The #CALC! error occurs when a formula runs into a calculation error with an array. The #CALC! error is a "new" error in Excel, introduced with dynamic arrays. It will not appear in older versions of Excel.
Empty array
An empty array can trigger a #CALC! error, and this is the most common reason you may see a #CALC! error in a worksheet, especially when using the FILTER function. This is because FILTER returns a #CALC! error when no values meet criteria – in other words, FILTER returns an empty array.
For example, in the screen below, the FILTER function is set up to filter the source data in B5:D11. However, the formula is asking for all data in the group "x", which doesn't exist. The result is a #CALC! error:

=FILTER(B5:D11,B5:B11="x") // no such group, empty array
Fix #1 - adjust filter logic
One option to fix this error is to adjust the filter criteria to return valid results. In the screen below, the formula has adjusted to filter on group "A", and the formula works normally:

=FILTER(B5:D11,B5:B11="a") // group "a" exists; no empty array
Fix #2 - set is_empty argument
Another option is to provide a "not found" value to return when no results are returned. In the screen below FILTER returns "No results" instead of an error:

=FILTER(B5:D11,B5:B11="x","No results") // message instead of error
Nested arrays
Another cause of #CALC! is a nested array, which happens when a function like BYROW, MAP, or MAKEARRAY runs a LAMBDA that returns an array instead of a single value. These functions need one result for each row, item, or cell, and Excel formulas won't return an array of arrays. For example, both formulas below return #CALC!:
=BYROW(B5:D6,LAMBDA(x,SORT(x,,-1,TRUE))) // SORT returns an array for each row
=MAKEARRAY(2,3,LAMBDA(r,c,SEQUENCE(2))) // SEQUENCE returns an array for each cell
To fix the error, reduce the array to one value with a function like SUM or TEXTJOIN. For an example, see List the matching words in each cell on the MAP page. To keep every value in its own cell, see Sort values in each row on the MAKEARRAY page.
Note: Microsoft documentation mentions another case that may cause #CALC! errors: unsupported arrays. If you have examples of formulas that throw #CALC! errors, please let me know.