JavaScript (ES2026) reference · Number Methods and Properties

JavaScript Number.MAX_SAFE_INTEGER Property

The largest integer JavaScript numbers can represent exactly: 2^53 - 1, or 9,007,199,254,740,991.

JavaScript (ES2026) Since ES2015

Create a free account to save this page, take notes and track your progress. Sign in

Syntax

Number.MAX_SAFE_INTEGER

Return value

9007199254740991

Examples

Precision ends hereTry it yourself
console.log(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER + 2);

Output

9007199254740991 9007199254740992
Large IDs: keep them as strings or BigIntTry it yourself
const id = "9007199254740993";
console.log(Number(id), BigInt(id));

Output

9007199254740992 9007199254740993n

Version history

VersionChange
JavaScript ES2015Added

Was this page helpful?