ISODD in Calligra Sheets: Odd-number checks and error caveats
Learn ISODD syntax, reproducible odd-number examples and source-level error-handling limitations.
Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in Calligra Sheets. How formula examples are checked
Release and verification scope. This guide checks the KDE Calligra Sheets release listing, which lists 26.08.2 (October 8, 2026) as the newest entry on October 12, 2026, together with the official function handbook, the version-pinned C++ implementation and its XML function description. The handbook has older editorial material: catalogue presence alone does not prove runtime behavior in every Linux package or build. Native Calligra execution was unavailable. Results are identified as KDE-documented, source-inferred or independently calculated expected; none are observed Calligra outputs. These examples use the English function names and a semicolon when a formula has multiple arguments, as used in KDE documentation. Locales may change argument separators, decimal signs, display of TRUE/FALSE and localized names; verify the entry in the installed Function Browser. A one-argument formula needs no separator.
Quick answer: =ISODD(value) asks whether the integer considered by Calligra’s parity helper is odd. KDE documents ISODD(12) as FALSE and ISODD(-7) as TRUE; Calligra 26.08.2 removes fractional parts toward zero in its shared evenness helper.
Purpose and the important ISODD-versus-ISEVEN difference
Odd integers leave a nonzero remainder when divided by two. In the examined 26.08.2 source, func_isodd calls the shared helper ValueCalc::isEven and returns the opposite of that Boolean. The helper floors nonnegative numeric inputs and ceils negative numeric inputs before taking % 2. Thus ISODD is a useful counterpart to ISEVEN for alternating rows or labeling numeric records, but it does not verify that an input was a whole number.
A source-level error-handling asymmetry matters: func_iseven checks for input errors and propagates them, while func_isodd does not perform an equivalent check. Separately, ValueCalc::isEven returns FALSE when handed an error value. At this callback level, an error could therefore yield TRUE through the negation; the formula evaluator may preempt or transform the call. Native testing is mandatory before stating how ISODD(NA()) appears in Calligra. This guide does not encourage using the behavior as error handling.
Exact syntax, parameter contract and aliases
=ISODD(x)
| Position | Argument | Required | KDE XML type | Default |
|---|---|---|---|---|
| 1 | x |
Yes | Any (parity has numeric meaning) |
None |
Return type: Boolean. KDE lists one argument, no optional second argument, and no extra rounding control. The registry also supports the alternate name COM.SUN.STAR.SHEET.ADDIN.ANALYSIS.GETISODD; this is one logical function, not an additional calculation. See KDE ISODD documentation, XML specification and C++ implementation.
Reproduce the function with typed numeric inputs
Type the numbers into column A. In B2 enter =ISODD(A2) and fill the formula through B7.
| Cell | Typed value | Expected result | Basis |
|---|---|---|---|
| A2 | 12 | FALSE | KDE-documented |
| A3 | -7 | TRUE | KDE-documented |
| A4 | 0 | FALSE | Independent parity calculation and source |
| A5 | 3.9 | TRUE | Source-inferred truncation toward zero: 3 |
| A6 | -3.9 | TRUE | Source-inferred truncation toward zero: -3 |
| A7 | 2.9 | FALSE | Source-inferred truncation toward zero: 2 |
These Boolean outputs are expected, not captured from Calligra. The negative examples demonstrate why floor(-3.9) = -4 would be the wrong basis for predicting the helper: the source uses roundUp(-3.9) = -3 on the negative branch.
Advanced example: mark inspection sample rows
For a dataset with integer row IDs in A2:A101, place in B2:
=IF(ISODD(A2);"Inspect";"Routine")
Copy B2 down. For IDs 1–4 the independently predicted labels are Inspect, Routine, Inspect, Routine. This is a deterministic sampling pattern, not a statistically random sample; don’t mistake it for risk-adjusted quality control.
Advanced example: enforce whole-number identifiers first
To avoid quietly treating a fraction as an integer, compare the raw check with a guard:
=ISODD(A2)
=IF(A2=TRUNC(A2);ISODD(A2);"Not an integer")
With A2 = 5.25, the first expression is source-inferred TRUE; the guarded expression is independently expected to return Not an integer. This guard assumes A2 is numeric. If IDs arrive as imported strings or empty cells, validate with ISNUMBER and source-system constraints before applying either formula.
Advanced example: parity is not logical negation in every error case
For ordinary, valid numeric integers, ISODD(x) and NOT(ISEVEN(x)) are expected to agree. Do not assert universal equivalence for errors or arbitrary text. The two callback implementations differ: ISEVEN propagates errors explicitly, while ISODD negates isEven and has no explicit pass-through. Preserve an error-validation layer rather than using the complement as an error policy.
Pitfalls and troubleshooting
- Unexpected result for 3.9 or -3.9: Both are treated as having odd integral parts in the examined parity helper, even though neither number is an integer. Add a separate whole-number check if data quality demands it.
- Error inputs: There is an unresolved source-level asymmetry.
=ISODD(NA()), division-by-zero inputs and error-bearing referenced cells require native formula-evaluator tests before the outcome or precise error wording can be documented. - Nonnumeric cells: The XML advertises
Any, but it does not specify all conversions for blanks, text such as"7", whitespace, or localized numerals. Do not assume Excel behavior without native Calligra verification. - Unexpected row grouping: Filtering or sorting can alter which ID is shown in a row; parity follows the numeric ID, not visual alternating row shading. Ensure you test the correct cell reference.
- Argument count and extremely large values: Only one argument is documented. The runtime error wording, numeric range and precision boundaries were not observed.
- Locale: On localized installations, separator, output text and parsing conventions may vary. These samples use plain numeric constants to reduce ambiguity.
Excel and LibreOffice portability
Microsoft’s ISODD reference likewise describes a truncation of fractional numbers. Positive and negative integer tests are conceptually portable, but Calligra’s callback-level error handling and coercion are not established as identical to Excel’s. LibreOffice builds may have different coercion and error logic. Test negative decimals, literal text, errors and array/range arguments in each destination application before treating imported formulas as equivalent. The Calligra COM.SUN.STAR...GETISODD alternate name is part of the registry; it does not represent a different calculation.
Sources and links checked
KDE ISODD handbook, Calligra 26.08.2 XML, parity callbacks, ValueCalc::isEven, KDE release page and Excel reference; accessed 2026-10-12. The website’s Calligra index and comparison index were accessible. Related functions include ISEVEN, ISNUMBER, TRUNC and IF..