Function note

ROUND counts digits in 32 bits, and the count wraps

FUNC.ROUND

FN-ROUND-001: ROUND counts digits in 32 bits, and the count wraps

Excel differs from the mathematical answer · measured · recorded 2026-11-04

ROUND cuts num_digits toward zero to a 32-bit integer D, limited to +/-2147483647, and keeps k = D + e + 1 significant digits, where e is the decimal exponent of |number| and the sum is computed in 32 bits. k of 15 or more keeps the 15-digit reading of the number; k below 0 gives 0. A large positive num_digits therefore wraps to no digits at all: for a number near 1.1E14, 2147483617 returns the number and 2147483635 returns 0. The boundaries move by exactly -e on both the +2^31 and -2^31 sides, for e from -308 to 308. num_digits of 2^31 or more acts as +2147483647 and -2^31 or less as -2147483647.

Call and input routeInputsExcelCorrect valueRecorded in
ROUND(-112500000000000, 2147483635)
cell-value2
number: -112500000000000
0xc2d9945ca2620000
num_digits: 2147483635
0x41dffffffcc00000
0
0x0000000000000000
-112500000000000
0xc2d9945ca2620000
Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this capture
ROUND(-112500000000000, 2147483617)
cell-value2
number: -112500000000000
0xc2d9945ca2620000
num_digits: 2147483617
0x41dffffff8400000
-112500000000000
0xc2d9945ca2620000
—Excel 16.0 build 20430, Windows 64-bit, CPU not recorded in this capture

Correct value: -112500000000000 is an integer, so rounding it to any non-negative number of places returns it.

Basis: Under the family rules the recorded rows match ROUND 36,821 of 36,945, ROUNDUP 52,022 of 52,841, ROUNDDOWN 59,182 of 59,995 and TRUNC 50,504 of 51,317, with no row lost and each remaining failure classified in the write-up. The wrap boundary was read at every decimal exponent in the recorded rows.

Evidence and capture sources

Machine-readable note records