JavaScript Number.POSITIVE_INFINITY Property

Beginner
5 min read
Updated: Nov 2026
3 examples
Property

Definition

Number.POSITIVE_INFINITY is the IEEE-754 value Infinity — the same as the global Infinity and -Number.NEGATIVE_INFINITY. Results larger than Number.MAX_VALUE overflow to it. 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.POSITIVE_INFINITY. Start with this line.

JavaScript
Number.POSITIVE_INFINITY
CallWhat it does
Number.POSITIVE_INFINITYPrimary signature.

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

Library declarations
JavaScript
Number.POSITIVE_INFINITY

Parameters

This member has no parameters beyond those shown in the signature.

Return Value

Return ValueDescription
*The current value of Number.POSITIVE_INFINITY.

JavaScript Examples

Example 1 — Read Number.POSITIVE_INFINITY

Confirm it matches the global Infinity literal.

JavaScript
console.log(Number.POSITIVE_INFINITY);
console.log(Number.POSITIVE_INFINITY === Infinity);
console.log(1 / 0);
Try It Yourself

How It Works

  1. Static access. Read Number.POSITIVE_INFINITY on the constructor.
  2. Same bits. It equals the global Infinity value.
  3. Division form. 1 / 0 is a common way to produce the same value.
  4. Not a method. There is no (1).POSITIVE_INFINITY.

Example 2 — Overflow Past MAX_VALUE

Finite ceiling vs true positive infinity after overflow.

JavaScript
console.log(Number.MAX_VALUE);                 // finite
console.log(Number.MAX_VALUE * 2);             // Infinity
console.log(Number.MAX_VALUE * 2 === Number.POSITIVE_INFINITY);
Try It Yourself

How It Works

  1. Most positive finite. Number.MAX_VALUE is still a real finite Number.
  2. Double it. The product cannot stay finite → Infinity.
  3. Named match. That result equals Number.POSITIVE_INFINITY.
  4. Guard math. Detect overflow before formatting or storing results.

Example 3 — Guard with Number.isFinite

Treat Infinity like other non-finite values.

JavaScript
console.log(Number.isFinite(Number.POSITIVE_INFINITY)); // false
console.log(Number.isFinite(3.5));                      // true
console.log(Number.POSITIVE_INFINITY === -Number.NEGATIVE_INFINITY);
Try It Yourself

How It Works

  1. Not finite. Number.isFinite(Infinity) is false.
  2. Normals pass. Ordinary numbers like 3.5 still return true.
  3. Sign flip. Negating NEGATIVE_INFINITY yields the same constant.
  4. Use as a gate. Prefer isFinite before toFixed or charts.

Browser & Runtime Support

Number.POSITIVE_INFINITY has been available for many years and is Baseline Widely available in modern browsers and Node.js.

✓ Baseline · Widely available

Number.POSITIVE_INFINITY

Supported in Chrome, Firefox, Safari, Edge, and Node.js. Safe for modern apps without a polyfill.

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.POSITIVE_INFINITY Excellent

Bottom line: Use Number.POSITIVE_INFINITY or Infinity freely. Prefer Number.isFinite when you need to reject all non-finite values.

Frequently Asked Questions

Number.POSITIVE_INFINITY is the positive Infinity value on Number. It is the same as the global Infinity (and -Number.NEGATIVE_INFINITY). Example: Number.MAX_VALUE * 2 equals Number.POSITIVE_INFINITY.
Yes. Read it on Number itself: Number.POSITIVE_INFINITY. There is no (5).POSITIVE_INFINITY on number instances, and it is not a method.
Number.POSITIVE_INFINITY === Infinity is true. Prefer Number.POSITIVE_INFINITY when you want a clear Number-namespace constant; Infinity is the global alias.
Compare with Number.POSITIVE_INFINITY, or use Number.isFinite(x) which returns false for Infinity, -Infinity, and NaN.
No. Number.MAX_VALUE is still a finite Number (the largest finite). Going larger — for example Number.MAX_VALUE * 2 — becomes Number.POSITIVE_INFINITY.
It is Baseline Widely available and supported in every modern browser and Node.js.

Next: NEGATIVE_INFINITY

Learn the signed -Infinity constant and negative overflow past -MAX_VALUE.

NEGATIVE_INFINITY 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.

9 people found this page helpful