Excel 16.0 build 19929
Windows, bitness not recorded, CPU not recorded
41 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.
Math and trigonometry functions
Refuses 2 of 1,374 recorded calls; the rest match
Of 1,374 recorded answers (1,227 in the answer bank and 147 workbook cells), 2 do not match: 2 are refused. How we measure this · See the Rust code
| Language | Name in Excel |
|---|---|
| Arabic | ODD |
| Bulgarian | ODD |
| Czech | ZAOKROUHLIT.NA.LICHÉ |
| Danish | ULIGE |
| German | ODD |
| Greek | ODD |
| English (Australia) | ODD |
| English (United Kingdom) | ODD |
| English (United States) | ODD |
| Spanish | REDONDEA.IMPAR |
| Estonian | ODD |
| Finnish | PARITON |
| French | IMPAIR |
| Hebrew | ODD |
| Croatian | ODD |
| Hungarian | PÁRATLAN |
| Indonesian | ODD |
| Italian | ODD |
| Japanese | ODD |
| Korean | ODD |
| Lithuanian | ODD |
| Latvian | ODD |
| Norwegian | ODDETALL |
| Dutch | ONEVEN |
| Polish | ZAOKR.DO.NPARZ |
| Portuguese (Brazil) | ODD |
| Portuguese (Portugal) | ÍMPAR |
| Romanian | ODD |
| Russian | НЕЧЁТ |
| Slovak | ODD |
| Slovenian | ODD |
| Serbian (Latin) | ODD |
| Swedish | UDDA |
| Thai | ODD |
| Turkish | TEK işlevi |
| Ukrainian | ODD |
| Vietnamese | ODD |
| Chinese (Simplified) | ODD |
| Chinese (Hong Kong) | ODD |
| Chinese (Traditional) | ODD |
Names from Microsoft's support site.
ODD(number)
ODD(number) rounds number away from zero to the nearest odd integer.
Microsoft's two remarks give the rule completely:
"Regardless of the sign of number, a value is rounded up when adjusted away from zero."
"If number is an odd integer, no rounding occurs."
So the direction is outward from zero in both half-planes — 1.5 rises to 3, and −2 falls to −3 — and an argument already on an odd integer is returned unchanged. The documented examples pin all five cases: 1.5 → 3, 3 → 3, 2 → 3, −1 → −1, −2 → −3.
Written out:
ODD(x) = sign(x) · ( 2·⌈ (|x| − 1)/2 ⌉ + 1 )
Domain and range. Domain: all reals. Range: the odd integers — with two qualifications, one at zero and one at the top of the floating-point range, both below.
Shape. A staircase with steps of width 2 and jump 2, symmetric under x ↦ −x (the function
is odd in the algebraic sense as well as in the arithmetic one: ODD(−x) = −ODD(x) away from zero).
It is idempotent — ODD(ODD(x)) = ODD(x) — and it is the away-from-zero counterpart of EVEN,
which does the same thing to an even lattice.
| Argument | Meaning | Required |
|---|---|---|
number | "The value to round." | Yes |
Exactly one argument; the declared arity is one to one. The slot is numeric and subject to
ordinary to-number coercion (coercion and lifting). The
declared coercion profile is the unary numeric scalar-or-array-elementwise one, so ODD is a
scalar kernel that lifts over arrays.
Returns Number — an integer value.
#VALUE!.ODD promises an odd result. Above 2^53 it cannot deliver one, and the reason is arithmetic
rather than implementation.
Binary64 spaces consecutive representable values 2 apart in [2^53, 2^54), 4 apart in [2^54, 2^55), and so on. Every finite double of magnitude at or above 2^53 is an even integer, because it is a multiple of at least 2. There is no odd double above that point. So for any argument in that range:
The same wall governs EVEN in mirror image, where the story is happier: above 2^53 every double
already is even, so EVEN's postcondition survives exactly where ODD's fails.
| Error | Condition | Basis |
|---|---|---|
#VALUE! | The argument is nonnumeric | Documented: "If number is nonnumeric, ODD returns the #VALUE! error value." |
| propagated | An error value in the argument | Shared call model |
There is no documented domain error, and none is needed: ODD is total on the reals.
ODD performs no transcendental work and, below the representability wall, no rounding of its
own. Its numerical character comes from three places.
Discontinuity amplification. Like INT, ODD is a step function, so a sub-ULP
error in its argument becomes a full step — here a jump of 2, not 1 — whenever the argument
straddles a step boundary. The boundaries are the odd integers themselves: an argument that ought
to be exactly 3 but arrives as the next double above 3 is rounded to 5. Anything computed and then
passed to ODD should be rounded to an integer first if the intent was an integer.
The representability wall, described in full above. An implementation that computes
2*ceil((|x|-1)/2)+1 in floating point does not merely return an even number above 2^53 — the
intermediate |x|-1 is itself a no-op there (subtracting 1 from a double spaced 2 apart returns
the same double), so the formula degenerates to the identity. That the naive formula and the
correct-by-convention answer coincide is a coincidence, not a design, and an implementation that
converts through a fixed-width integer instead will produce something different — or wrap — at the
same inputs.
The sign of zero. ODD(-0.0) has an argument whose sign bit is set but whose value is zero,
so the "away from zero" direction is even less determined than at +0. Whether an implementation
consults the sign bit is a decision; it should be a recorded one.
The relevant background is not a special-function reference — there is no series to sum here — but
the general treatment of rounding to an integer lattice and the exactness of the operations
involved: IEEE 754-2019's roundToIntegral* family, and Muller et al., Handbook of
Floating-Point Arithmetic, on the spacing of binary64 and on rounding to a grid.
Quoted from the public repository DnaCalc/DnaCalc, crates calc-func and calc-fml, at commit 9e1884369a67. Comments are the source's own. A kernel shared with other functions appears once, on its module page.
ODD · 1 lines · calc-func/src/catalogue/rounding.rs on GitHubcall(ODD, "ODD", 1, NUMBER, odd)
call catalogue/roundingnumeric catalogue/roundingnumbers catalogue/roundingabs catalogue/roundingodd catalogue/roundingto_parity catalogue/roundingtruncate decimalceil decimalout_with_subnormal catalogue/kitNo implementation has been published with a Handbook test suite for this function.
The recorded environments below distinguish a reading from a same-input comparison. Counts describe captured inputs in each environment; overlapping captures and comparisons are not totals of unique worksheet calls.
| Excel 16.0 build | Platform and CPU | Captured inputs |
|---|---|---|
| 19929 | Windows, bitness not recorded, CPU not recorded | 41 |
| 20430 | Windows, 64-bit, CPU not recorded | 1,227 |
Agreement on these compared inputs does not establish agreement on unmeasured inputs.
Recorded environments and comparison details.
Windows, bitness not recorded, CPU not recorded
41 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build.
Windows, 64-bit, CPU not recorded
1,227 captured inputs are indexed for this environment. Capture dates: 2026-09-29 to 2026-09-29. This is a reading count, not a comparison with another build.
EVEN — the twin, rounding away from zero to an even integer. The pair are not inverses and
do not compose usefully; they partition nothing. Note the asymmetry recorded above: EVEN's
postcondition survives the 2^53 wall and ODD's does not.ISODD — the parity tests, which truncate toward zero. ODD
is a rounding function, not a predicate, and ISODD(ODD(x)) is true by construction only below
the wall.ODD is not MROUND(x, 2) with
an offset: MROUND rounds to nearest while ODD rounds away, so they agree only when the
argument is already past the midpoint.TRUNC — the other integer-valued roundings, each with a
different convention. This category has floor, truncate-toward-zero, away-from-zero and
half-away-from-zero all in play, and the names do not disclose which is which.ROUNDUP(x, 0) is the away-from-zero integer rounding without the parity constraint.No named variants are recorded yet.
Suggest a correction or contribute an implementation · For agents