SQRT
Quirk foundCategory: Math and trigonometry · Last tested 2026-07-04
Support matrix
| Engine | Documented | Live-tested | Verdict |
|---|---|---|---|
| Excel | Yes | Not yet | n/a |
| Google Sheets | Yes | Not yet | n/a |
| LibreOffice Calc | Yes | Yes (24.2.7.2, 2026-07-04) | Quirk found |
Discovered quirks
- =SQRT(-16) on LibreOffice Calc returned #VALUE!, but the documented/expected result is #NUM!. Microsoft's SQRT docs state verbatim: 'If number is negative, SQRT returns the #NUM! error value' -- https://support.microsoft.com/en-US/Excel/functions/sqrt-function; MISMATCH vs expected: expected '#NUM!', got '#VALUE!'
Executed test cases
LibreOffice Calc 24.2.7.2 (tested 2026-07-04)
| Formula | Description | Result | Expected | Verdict |
|---|---|---|---|---|
| =SQRT(16) | Basic perfect-square root | 4 | 4 | Matched |
| =SQRT(0) | Square root of zero is zero | 0 | 0 | Matched |
| =SQRT(-16) | Negative input has no real square root -> #NUM! | #VALUE! | #NUM! Microsoft's SQRT docs state verbatim: 'If number is negative, SQRT returns the #NUM! error value' -- https://support.microsoft.com/en-US/Excel/functions/sqrt-function |
Mismatch |
| =SQRT(ABS(-16)) | Microsoft's own SQRT documentation demonstrates wrapping a possibly-negative argument in ABS as the standard workaround to avoid #NUM! | 4 | 4 Same doc page above shows an example using '=SQRT(ABS(A2))' specifically to sidestep the negative-input #NUM! case |
Matched |
Docs & syntax
- Excel: official documentation
- Google Sheets: official documentation
- LibreOffice Calc: official documentation