JavaScript Number.MAX_VALUE Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

Number.MAX_VALUE is the largest positive finite Number JavaScript can represent — about 1.8e+308. Anything larger becomes Infinity. It is a static property, not a method.

Read the notes below before you rely on this property. Prefer feature detection when support is limited.

Syntax

Use Number.MAX_VALUE. Start with this line.

JavaScript
Number.MAX_VALUE
CallWhat it does
Number.MAX_VALUEPrimary signature.

Built into JavaScript. Read Number.MAX_VALUE on the Number constructor — no import required.

Library declarations
JavaScript
Number.MAX_VALUE

Parameters

ParameterDescription
Overflow checkOptional. Guard products before they become Infinity

Return Value

Return ValueDescription
*The current value of Number.MAX_VALUE.

JavaScript Examples

Example 1 — Read Number.MAX_VALUE

Print the largest finite Number and confirm it is finite.

JavaScript
console.log(Number.MAX_VALUE);
console.log(Number.isFinite(Number.MAX_VALUE));
Try It Yourself

How It Works

  1. Static access. Read Number.MAX_VALUE on the constructor — there is no (5).MAX_VALUE.
  2. Huge but finite. The printed value is about 1.8e+308.
  3. Still a Number. Number.isFinite returns true — this is not Infinity yet.
  4. Prefer the name. Use the constant instead of hard-coding the literal.

Example 2 — Overflow to Infinity

Multiply past the ceiling and lose the real magnitude.

JavaScript
console.log(Number.MAX_VALUE * 1.1);   // Infinity
console.log(-Number.MAX_VALUE * 1.1);  // -Infinity
console.log(Number.isFinite(Number.MAX_VALUE * 1.1)); // false
Try It Yourself

How It Works

  1. Past the ceiling. MAX_VALUE * 1.1 cannot stay finite → Infinity.
  2. Negative side. The same idea for -MAX_VALUE * 1.1 → -Infinity.
  3. Detect it. Number.isFinite returns false for both infinities.
  4. Magnitude is gone. Once overflowed, you cannot recover the original size.

Example 3 — MAX_VALUE vs MAX_SAFE_INTEGER

Huge floats and exact integers are different limits.

JavaScript
console.log(Number.MAX_SAFE_INTEGER);
console.log(Number.MAX_VALUE > Number.MAX_SAFE_INTEGER); // true
console.log(Number.isSafeInteger(Number.MAX_VALUE));     // false
Try It Yourself

How It Works

  1. Safe integer ceiling. MAX_SAFE_INTEGER is 253 − 1 (~9e15).
  2. Much smaller. MAX_VALUE is vastly larger than that integer limit.
  3. Not a safe int. Number.isSafeInteger(Number.MAX_VALUE) is false.
  4. Pick the right tool. Need exact ints? Use safe integers (or BigInt). Need magnitude? Use MAX_VALUE.

Browser & Runtime Support

Number.MAX_VALUE is part of core JavaScript and is Baseline Widely available in modern browsers and Node.js.

✓ Baseline · Widely available

Number.MAX_VALUE

Supported in Chrome, Firefox, Safari, Edge, and Node.js for decades. Safe for every modern JavaScript environment.

99% Modern browser support
Google Chrome Supported · Desktop & Mobile
Full support
Mozilla Firefox Supported · Desktop & Mobile
Full support
Apple Safari Supported · macOS & iOS
Full support
Microsoft Edge Supported · Chromium
Full support
Internet Explorer No native support · Use a polyfill
Polyfill
Opera Supported · Modern versions
Full support
Samsung Internet Supported · Android
Full support
Bun Supported · JavaScript runtime
Supported
Deno Supported · JavaScript runtime
Supported
Node.js Supported · Server runtime
Supported
Android WebView Supported · Modern WebView
Full support
Number.MAX_VALUE Excellent

Bottom line: Use Number.MAX_VALUE freely — no polyfill needed. Prefer the named constant over hard-coding 1.7976931348623157e+308.

Frequently Asked Questions

Number.MAX_VALUE is the largest positive finite Number JavaScript can represent — about 1.7976931348623157e+308. Values larger than this become Infinity.
Yes. Read it on Number itself: Number.MAX_VALUE. There is no (5).MAX_VALUE on number instances, and it is not a method.
The result becomes Infinity (or -Infinity for large negatives). The original magnitude is lost. Guard multiplications before they overflow if you need a finite result.
MAX_VALUE is the largest magnitude float (~1.8e+308). MAX_SAFE_INTEGER is the largest integer that is still exact (2^53 - 1). Huge floats above MAX_SAFE_INTEGER are not precise integers.
No. -Number.MAX_VALUE is the most negative finite Number. Number.MIN_VALUE is the smallest positive Number (closest to zero), about 5e-324.
It is Baseline Widely available and supported in every modern browser and Node.js.

Next: MIN_VALUE

Learn the smallest positive Number JavaScript can represent before underflow toward 0.

MIN_VALUE tutorial →

CODETOFUN NEWS

Stay Ahead in Tech

Get the latest IT news, programming updates, and technology trends directly on your phone.

Your daily dose of tech, straight to your feed.

About the author

Mari Selvan M P
Mari Selvan M P 🔗

Developer, cloud engineer, and technical writer

  • Experience 12 years building web and cloud systems
  • Focus Full Stack Development, AWS, and Developer Education

I write practical tutorials so students and working developers can learn by doing—from databases and APIs to deployment on AWS.

11 people found this page helpful