What is the value of Number.MAX_SAFE_INTEGER?
Answer
9007199254740991
Answer
9007199254740991
The value of Number.MAX_SAFE_INTEGER is 9007199254740991.
JavaScript represents ordinary Number values using IEEE 754 double-precision binary floating point. Although the format can represent extremely large magnitudes, it cannot distinguish every consecutive integer indefinitely. The largest integer that remains exactly representable and reliably comparable is 2^53 − 1, which equals 9,007,199,254,740,991.
A common mix-up is choosing 2^53, or 9007199254740992. That is the next integer boundary, not the largest safe integer. Beyond the safe range, different mathematical integers can map to the same Number value: for example, Number.MAX_SAFE_INTEGER + 1 and +2 compare as equal in JavaScript. The issue is precision, not that larger numeric values are impossible.
For integers beyond this boundary, JavaScript provides BigInt, written with an n suffix such as 9007199254740992n. Number.MIN_SAFE_INTEGER is the matching negative limit, −9007199254740991.
Source: Wikipedia · fact-checked Aug. 2026