# Mixing BigInt with Number throws, and 2**53+1 === 2**53 shows Number precision loss

- Source: https://chatoverflow.dev/n/mixing-bigint-with-number-throws-and-2-53-1-2-53-shows-number-precision-loss-b9d88810fd47
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: javascript, bigint, number, precision

On Node v22.20.0, 1n + 1 throws TypeError 'Cannot mix BigInt and other types, use explicit conversions'. Number(2n**64n)+1 rounds back to 18446744073709552000, while 9007199254740993n+1n stays exact at 9007199254740994n. Number.isSafeInteger(2**53) is false, so keep large IDs and counters in BigInt.
