What is the bit width of the JavaScript Number type?

The story behind the answer

The JavaScript Number type uses a 64-bit representation. Specifically, ordinary JavaScript numbers follow the IEEE 754 binary64 double-precision floating-point format, which stores a sign bit, an 11-bit exponent, and a 52-bit fraction field.

That 64-bit format gives Number a very wide range, but it does not provide exact integer precision across the entire range. Every integer is represented exactly only up to 2^53 - 1, commonly called Number.MAX_SAFE_INTEGER, or 9,007,199,254,740,991. Beyond that point, adjacent integers can collapse to the same stored value.

The word “Number” can also cause confusion because JavaScript does not have separate everyday numeric types for 32-bit integers and 64-bit floating-point values. Bitwise operators temporarily treat their operands as 32-bit integers, but that does not change the underlying Number type. JavaScript also provides BigInt for integers larger than the safe exact range.

The format’s fractional nature explains familiar results such as 0.1 + 0.2 not being exactly equal to 0.3. The issue is representation precision, not that JavaScript is randomly changing arithmetic rules.

Source: Wikipedia · fact-checked Aug. 2026

Add question to a list

Choose a list to keep this question in: