Auto round float number (reached over 15 digit) in SUMIF function

Posted by: nguyenvu.work on 27 January 2026, 3:13 am EST

  • Posted 27 January 2026, 3:13 am EST

    • I’m using SUMIF function on my workbook, the result after calculation is
      123456789012345.6
      , I expected get the original value, but the SUMIF function (and other) always round the value, it be come
      123456789012346
      on the cell display. Can I prevent auto round or are the any way to show the original value?
  • Posted 27 January 2026, 8:16 am EST

    Hi,

    This happens because the value exceeds SpreadJS’s 15-digit precision limit.

    SpreadJS follows Excel’s design and supports a maximum of 15 significant digits. This isn’t a bug or a SpreadJS-specific limitation; it’s an intentional design choice based on how JavaScript handles numbers.

    Your value, 123456789012345.6, contains 16 significant digits. The whole number part already uses 15 digits, and adding the decimal digit pushes it beyond the supported precision. Because of this, rounding occurs.

    Internally, SpreadJS uses JavaScript’s native Number type, which is based on the IEEE-754 double-precision floating-point standard. While JavaScript can sometimes represent up to 17 significant digits, only about 15 digits are reliably accurate. To ensure consistent and predictable behavior across all browsers and platforms, SpreadJS aligns with Excel and enforces the 15-digit limit. When that limit is exceeded, the least significant digits are rounded.

    SpreadJS uses 15 digits instead of 17 to stay fully consistent with Excel, ensure cross-platform reliability, avoid rendering edge cases, and provide predictable rounding behavior.

    It’s also important to note that this rounding affects both display and calculations. The value is rounded internally, stored in that rounded form, and then used by functions like SUMIF and other calculations.

    This behavior can’t really be “fixed” because it’s a fundamental limitation of how numbers are stored and processed. It comes from the IEEE-754 standard used by most programming languages, the need to remain compatible with Excel, performance considerations, and the fact that computers store numbers in binary, which cannot exactly represent all decimal values.

    Regards,

    Priyam

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels