THE WORLD'S LARGEST WEB DEVELOPER SITE

JavaScript MAX_VALUE Property

❮ JavaScript Number Reference

Example

Return the largest number possible in JavaScript.

Number.MAX_VALUE;
Try it Yourself »

Definition and Usage

The MAX_VALUE property returns the largest number possible in JavaScript.

This static property has a value of 1.7976931348623157e+308.

Note: Numbers larger than MAX_VALUE are represented as infinity.


Always Use Number.MAX_VALUE

MAX_VALUE is a static property of the JavaScript Number object. You can only use it as Number.MAX_VALUE.

Using x.MAX_VALUE, where x is a number or a Number object, will return undefined:

Example

var x = 100;
x.MAX_VALUE;

The value of x will be:

undefined
Try it Yourself »

Browser Support

Property
MAX_VALUE Yes Yes Yes Yes Yes

Syntax

Number.MAX_VALUE

Technical Details

Return Value: A Number, 1.7976931348623157e+308
JavaScript Version: ECMAScript 1

❮ JavaScript Number Reference