JavaScript .MAX_VALUE
Published Aug 9, 2025
Contribute to Docs
JavaScript’s .MAX_VALUE represents the largest positive numeric value that can be represented using the Number type before it overflows to Infinity.
Syntax
Number.MAX_VALUE;
Parameters:
None: .MAX_VALUE is a static property of the Number object.
Return value:
A number representing the largest positive finite value JavaScript can represent using the Number type (approximately 1.7976931348623157e+308).
Example
This example shows what happens when a number exceeds .MAX_VALUE:
const large = Number.MAX_VALUE * 2;console.log(large);
The output generated by this code is:
Infinity
Multiplying beyond .MAX_VALUE causes the result to overflow to Infinity, since JavaScript can’t represent values larger than this limit.
Codebyte Example
This codebyte example checks whether a large number is still within JavaScript’s numeric limit:
Contribute to Docs
- Learn more about how to get involved.
- Edit this page on GitHub to fix an error or make an improvement.
- Submit feedback to let us know how we can improve Docs.
Learn JavaScript on Codecademy
- Front-end engineers work closely with designers to make websites beautiful, functional, and fast.
- Includes 34 Courses
- With Professional Certification
- Beginner Friendly.115 hours
- Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.
- Beginner Friendly.15 hours