Known larger differences on 557 of 51,465 recorded answers
Of 51,465 recorded answers (51,317 in the answer bank and 148 workbook cells), 557 do not match: 236 differ by more than 16 ULP, 321 differ by at most 16 ULP. How we measure this · See the Rust code
Local names in 40 languages
Language
Name in Excel
Arabic
TRUNC
Bulgarian
TRUNC
Czech
USEKNOUT
Danish
AFKORT
German
TRUNC
Greek
TRUNC
English (Australia)
TRUNC
English (United Kingdom)
TRUNC
English (United States)
TRUNC
Spanish
TRUNCAR
Estonian
TRUNC
Finnish
KATKAISE
French
TRONQUE
Hebrew
TRUNC
Croatian
TRUNC
Hungarian
CSONK
Indonesian
TRUNC
Italian
TRUNC
Japanese
TRUNC
Korean
TRUNC
Lithuanian
TRUNC
Latvian
TRUNC
Norwegian
AVKORT
Dutch
GEHEEL
Polish
LICZBA.CAŁK
Portuguese (Brazil)
TRUNC
Portuguese (Portugal)
TRUNCAR
Romanian
TRUNC
Russian
ОТБР
Slovak
TRUNC
Slovenian
TRUNC
Serbian (Latin)
TRUNC
Swedish
AVKORTA
Thai
TRUNC
Turkish
NSAT işlevi
Ukrainian
TRUNC
Vietnamese
TRUNC
Chinese (Simplified)
TRUNC
Chinese (Hong Kong)
TRUNC
Chinese (Traditional)
TRUNC
Names from Microsoft's support site.
What it does
TRUNC(number, [num_digits])
TRUNC(number, [num_digits]) rounds toward zero by removing digits beyond the requested precision. Positive digit counts address places after the decimal point, zero the integer position, and negative counts places to its left. TRUNC defaults to zero digits.
Try it
=TRUNC(-7.29,1) returns -7.2; =TRUNC(-7.29) returns -7. INT of the same negative input would return -8.
Quirks
The recorded functions first read fifteen significant decimal digits. Asking to retain more digits can therefore change an input that mathematically needs no rounding. The recorded ROUNDDOWN(283025097725723.5,0) returns 283025097725724, showing that the preliminary reading can move the number upward before truncation. Huge digit counts have recorded integer-conversion behaviour rather than a simple “keep everything” rule. Near the normal-range boundary and overflow, worksheet publication needs separate handling.
The exact-cell minimum normal input 0x0010000000000000 has a recorded early return of 0x000ffffffffffffa, even at zero requested digits. That return happens before ordinary digit rounding. At the upper end, the current model can publish a tagged NaN bit pattern as a worksheet number. See the packing rules and worked encodings.
The rounding functions read 15 digits first, so ROUNDDOWN can round up
Before choosing a digit these functions read the number to 15 significant digits on the x87 unit: with e the decimal exponent and n = 14 - e, y = RN64(|x| * 10^n), or RN64(|x| / 10^-n) when n is negative, while 10^|n| is exact in 64 bits (|n| <= 27). A half in y goes up for ROUNDDOWN, ROUNDUP and TRUNC and down for ROUND. So digits beyond the 15th are lost even when the requested precision keeps them: ROUND(-1594628480062905,14) loses its last digit, and ROUNDDOWN(283025097725723.5,0) returns 283025097725724, larger than its input.
Formula
Excel
Mathematical value
ROUND(-1594628480062905, 14) Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800HInputs and reference value
Number supplied through a cell.
number: -1594628480062905 0xc316a939806956e4
num_digits: 14 0x402c000000000000
An integer rounded to 14 places is itself.
-1594628480062900 0xc316a939806956d0
-1594628480062905 0xc316a939806956e4
ROUNDDOWN(283025097725723.5, 0) Excel 16.0 build 20430, Windows 64-bit, AMD Ryzen 7 4800HInputs and reference value
Near DBL_MAX, ROUND returns NaN bit patterns that Excel treats as numbers
ROUND of a number near 1.8E308 can return a binary64 with an all-ones exponent field. A decimal result of 2^1024 or more keeps its 53-bit significand, and its exponent is carried into the exponent field without a check, so the bits are a NaN. ROUND, ROUNDDOWN and TRUNC return those bits; ROUNDUP gives #NUM!. The recorded rows hold 430 such ROUND rows, 102 ROUNDDOWN and 95 TRUNC, and all 627 follow this. Even ROUND(DBL_MAX,0), whose answer is DBL_MAX, returns 0x7ff000000000000a. The cell shows 2E+308 or 1.8E+308, and a pattern with its sign bit set shows 2E+308 too, with no minus. ISNUMBER gives TRUE, ISERROR FALSE, TYPE 1, ERROR.TYPE #N/A; A1=A1 and A1>0 are TRUE. =A1, N(A1), MAX(A1), ABS(A1) and IFERROR(A1,...) pass the pattern on, as does =-A1 with its sign unchanged. Arithmetic on it (A1+0, A1*1, A1-A1, SUM, ROUND) gives #NUM!, and TEXT(A1,"0") gives #VALUE!. Saved to .xlsx, each such cell is written as the error #NUM!; reopened, the cells read #NUM! until a full recalculation brings the patterns back.
Explanation (inferred): That one decimal-to-binary conversion routine is the source of all these patterns is inferred from the exponent-overflow encoding.
Formula
Excel
Mathematical value
ROUND(1.7976931348623157E+308, 0) Excel 16.0 build 20527, Windows; bitness and CPU not recorded in this readingInputs and reference value
ROUNDUP, ROUNDDOWN and TRUNC read num_digits from its low 16 bits
ROUNDUP, ROUNDDOWN and TRUNC take the digit count from the low 16 bits of the integer part of |num_digits|, with the sign of num_digits. If |num_digits| is 2^32 or more, or those low bits are 32768 or more, the truncation happens at 100 places (10^-100, or 10^100 for a negative count). So 65536 acts as 0, 65537 as 1, 32768 to 65535 as 100, and -2147483748, whose low 16 bits are 100, as -100. In the out-of-range case ROUNDUP adds no unit for a positive count, and gives #NUM! for a negative count when a digit is dropped.
Formula
Excel
Mathematical value
ROUNDUP(1.234567890123456e-200, 65536) Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this captureInputs and reference value
Number supplied through a cell.
number: 1.234567890123456e-200 0x166e3d71f622be8f
num_digits: 65536 0x40f0000000000000
The exact decimal expansion of this binary64 number has fewer than 32768 places, so a truncation at num_digits places returns the number itself.
1 0x3ff0000000000000
1.234567890123456e-200 0x166e3d71f622be8f
ROUNDUP(1.234567890123456e-200, 65537) Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this captureInputs and reference value
Number supplied through a cell.
number: 1.234567890123456e-200 0x166e3d71f622be8f
num_digits: 65537 0x40f0001000000000
The exact decimal expansion of this binary64 number has fewer than 32768 places, so a truncation at num_digits places returns the number itself.
0.1 0x3fb999999999999a
1.234567890123456e-200 0x166e3d71f622be8f
ROUNDUP(1.234567890123456e-200, 32768) Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this captureInputs and reference value
Number supplied through a cell.
number: 1.234567890123456e-200 0x166e3d71f622be8f
num_digits: 32768 0x40e0000000000000
The exact decimal expansion of this binary64 number has fewer than 32768 places, so a truncation at num_digits places returns the number itself.
0 0x0000000000000000
1.234567890123456e-200 0x166e3d71f622be8f
TRUNC(1.234567890123456e-200, 65536) Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this captureInputs and reference value
Number supplied through a cell.
number: 1.234567890123456e-200 0x166e3d71f622be8f
num_digits: 65536 0x40f0000000000000
The exact decimal expansion of this binary64 number has fewer than 32768 places, so a truncation at num_digits places returns the number itself.
With DBL_MIN (0x0010000000000000) as number, TRUNC, ROUNDDOWN and ROUNDUP return the subnormal 0x000ffffffffffffa at each num_digits recorded, so TRUNC(DBL_MIN,0) is not 0. That value is 6 steps below DBL_MIN and 3 steps below 0x000ffffffffffffd, the binary64 nearest the 15-digit reading 2.22507385850720E-308. The recorded rows hold 256 such cases for each of the three functions. ROUND gives 0 on the same inputs.
Formula
Excel
Mathematical value
TRUNC(2.2250738585072014e-308, 0) Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this captureInputs and reference value
The current worksheet wrapper reads numeric arguments in order and flushes subnormal numeric operands to zero. Return zero for a zero number before finding its decimal exponent. The following steps start with a finite, nonzero admitted input. The stored-arithmetic chapter explains exact binary decoding and significand rounding.
First construct the number’s fifteen-significant-digit reading. Extract the exact binary64 value and find its decimal exponent e by comparisons with exact powers of ten, so 10^e <= abs(x) < 10^(e+1). Put s=14-e. When abs(s)<=27, evaluate abs(x)*10^s (or abs(x)/10^(-s)) with a 64-bit significand and extended exponent range, rounding to nearest/even. Do not store that scaled value to binary64 before the integer decision. Round it to an integer: exact halves go down for ROUND’s reading, up for the directed functions’ readings. Retain the sign and the exact decimal value integer*10^(-s).
This reading step is a measured reconstruction with a known counterexample even inside the stated scale range. For abs(s)>27, Excel’s scaling is still open; the current code falls back to exact binary64-to-decimal rounding to fifteen digits. That fallback is a candidate, not an identified Excel stage.
Truncate the magnitude of num_digits and retain its low sixteen bits, then restore the sign. Magnitudes at least 2^32, or low bits at least 32768, select an out-of-range sentinel of 100 places with the original sign.
Before digit rounding, check the special initial-reading return described below. If it applies, return its packed result immediately. Otherwise truncate the exact decimal reading at unit 10^(-D), then convert that truncation to nearest binary64, using the overflow packing exception when required.
Return that stored truncation without adding a unit. Flush final subnormal results to zero, apart from the special initial-reading path below.
Worked: x=-7.29, D=1 retains 72 tenths of the magnitude and restores the negative sign, giving -7.2. A count of 65537 uses low bits equal to one, so it selects the same decimal position. This conversion rule is distinct from ROUND’s signed 32-bit count.
The current boundary reconstruction handles a normal input below twice the minimum normal value whose initial reading becomes subnormal: convert twice the reading (a normal number) and decrement its encoded exponent field by one, retaining the sign and significand. This reproduces the observed packing rather than an ordinary subnormal conversion. Other final subnormals still flush. The large-scale reading and remaining last-bit discrepancies stay open; consult the dated failure breakdown.
Rust code
Show the CalcFunc source of this function
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.
No implementation has been published with a Handbook test suite for this function.
Version differences
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
43
20430
Windows, 64-bit, CPU not recorded
51,317
The record contains no same-input comparison between these environments. Reading different inputs on different builds does not establish either a version change or cross-build agreement.
These are earlier recorded answers, not new Excel runs or an additional cross-build comparison. The function JSON retains each source locator, exact argument bits where available, and input-route status. Call notation does not imply that captured binary64 values were entered as decimal formula literals.
Excel 16.0 build 20430
Windows 64-bit, CPU not recorded in this capture
TRUNC(1.234567890123456e-200, 65536) returned 0 (0x0000000000000000). TRUNC(2.2250738585072014e-308, 0) returned 2.2250738585071984e-308 (0x000ffffffffffffa). 1 further recorded control is attached. Inputs were supplied through cells using Value2. These are controls from this environment, not a same-input comparison with another build.
43 captured inputs are indexed for this environment. Capture dates are not recorded. This is a reading count, not a comparison with another build. Retained control =TRUNC(0) returned 0.0 (0x0000000000000000). The selected archive row does not record its input plumbing; no input route is inferred.
Observed formulas and results
=TRUNC(0) → 0.0 0x0000000000000000(not-recorded)
Excel 16.0 build 20430
Windows, 64-bit, CPU not recorded
51,317 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. Retained control TRUNC(1,0) returned 1 (0x3ff0000000000000). The capture specifies exact-double bulk Value2 cell input.
Observed formulas and results
TRUNC(1,0) → 1 0x3ff0000000000000(cell-value2)
Alternatives
ROUND chooses a nearest decimal; MROUND chooses a multiple. INT rounds negatives downward; ROUNDDOWN makes the digit count explicit.