Example 1 — Read Number.MIN_VALUE
Print the smallest positive Number.
Number.MIN_VALUE;
// 5e-324 How It Works
Prefer the named constant over typing 5e-324 by hand when documenting the positive floor.
Number.MIN_VALUE is a static data property on Number (same API as MDN Number.MIN_VALUE). It is the smallest positive Number — about 5e-324 — the positive value closest to zero. Anything smaller underflows toward 0. This tutorial covers its value, underflow guards, how it differs from -MAX_VALUE and EPSILON, five examples, and try-it labs.
Static property
5e-324
Closest to 0+
→ 0
No
Everywhere
Beginners often guess that MIN_VALUE means “the most negative number.” In JavaScript it means the opposite end of the scale near zero: the tiniest positive Number that can still be stored.
In mainstream engines (V8, SpiderMonkey, JavaScriptCore) that value is 5e-324 (exactly 2−1074). Values smaller than that underflow and become 0.
Static properties belong to Number itself. Always write Number.MIN_VALUE. There is no (5).MIN_VALUE, and you do not call it like a function.
This page is part of JavaScript Number Properties. Related topics include Number.MAX_VALUE, Number.EPSILON, and Number.isFinite().
MIN_VALUE PropertyNumber.MIN_VALUE is the smallest non-zero positive Number the implementation can represent. ECMAScript allows engines without denormalized floats to use a larger value, but Chrome, Firefox, Safari, and Node.js all use 5e-324.
-Number.MAX_VALUE, not MIN_VALUE.MIN_VALUE typically become 0 (underflow).General form of the static property Number.MIN_VALUE:
Number.MIN_VALUE In mainstream engines: 5e-324 (2−1074).
| Attribute | Value |
|---|---|
| Writable | false |
| Enumerable | false |
| Configurable | false |
Number.MIN_VALUE; // 5e-324
Number.MIN_VALUE / 2; // 0 (underflow)
Number.MIN_VALUE > 0; // true
function divide(x, y) {
if (x / y < Number.MIN_VALUE) {
return "Process as 0";
}
return x / y;
} | Goal | Code |
|---|---|
| Smallest positive Number | Number.MIN_VALUE |
| Most negative finite | -Number.MAX_VALUE |
| Detect underflow | x / y < Number.MIN_VALUE |
| Gap after 1 | Number.EPSILON |
| Largest finite | Number.MAX_VALUE |
| Check zero after math | result === 0 |
Four facts to remember about Number.MIN_VALUE.
staticProperty on Number
5e-324Smallest positive Number
0Below the floor
noRead-only constant
MIN_VALUE vs EPSILON vs -MAX_VALUEMIN_VALUE | EPSILON | -MAX_VALUE | |
|---|---|---|---|
| Approx. size | 5e-324 | ~2.22e-16 | ~-1.8e+308 |
| Sign | Positive | Positive | Negative |
| Meaning | Closest to 0+ | Gap after 1 | Most negative finite |
| Common mix-up | “Most negative?” No | Not the tiniest Number | Not MIN_VALUE |
Examples follow MDN Number.MIN_VALUE patterns. Use View Output or Try It Yourself for each case.
Read the constant and watch underflow become zero.
Number.MIN_VALUEPrint the smallest positive Number.
Number.MIN_VALUE;
// 5e-324 Prefer the named constant over typing 5e-324 by hand when documenting the positive floor.
0Halving MIN_VALUE drops below the representable range.
Number.MIN_VALUE / 2; // 0 Unlike overflow to Infinity, underflow collapses tiny positives toward zero.
MDN-style guards and common beginner mix-ups.
Return a message when the quotient would underflow.
function divide(x, y) {
if (x / y < Number.MIN_VALUE) {
return "Process as 0";
}
return x / y;
}
divide(5e-324, 1); // 5e-324
divide(5e-324, 2); // "Process as 0" MDN’s pattern detects underflow before you treat the quotient as a meaningful tiny Number.
EPSILONMIN_VALUE is vastly smaller than the gap after 1.
Number.MIN_VALUE; // 5e-324
Number.EPSILON; // ≈ 2.220446049250313e-16
Number.MIN_VALUE < Number.EPSILON; // true Use EPSILON for near-1 equality. Use MIN_VALUE when discussing the positive floor of the type.
Compare the positive floor with the negative ceiling.
Number.MIN_VALUE; // 5e-324 (positive!)
-Number.MAX_VALUE; // ≈ -1.7976931348623157e+308
Number.MIN_VALUE > 0; // true Remember the naming trap: MIN_VALUE = smallest positive, not most negative.
-MAX_VALUE.MIN_VALUEDivide or multiply toward values near zero.
Ask whether the positive result is still ≥ Number.MIN_VALUE.
Above the floor → keep the Number. Below it → usually 0.
Return a message, treat as zero, or rescale the computation.
Number.MIN_VALUE only.Number.MIN_VALUE() — it is not a function.MIN_VALUE is positive — not the most negative Number.MIN_VALUE typically underflow to 0.5e-324.Number.MIN_VALUE is Baseline Widely available. Mainstream engines expose 5e-324.
Safe for production everywhere. Use it as the named smallest positive Number.
Bottom line: Use Number.MIN_VALUE for the positive floor. Use -Number.MAX_VALUE for the most negative finite Number. Use EPSILON for equality near 1.
Number.MIN_VALUE is the static constant for the smallest positive JavaScript Number. Below that floor, results underflow toward 0.
Continue with MAX_VALUE, EPSILON, or the Number properties hub.
Number.MIN_VALUE on the constructor-Number.MAX_VALUE for the most negative finiteEPSILON for float equality near 1(5).MIN_VALUE or Number.MIN_VALUE()0Number.MIN_VALUEStatic positive floor for JavaScript Numbers.
static
API5e-324
Constantto 0
Limitpositive
Caveatno
ReadonlyNumbers this small are often subnormal (denormalized) IEEE-754 values — they trade precision for the ability to represent values extremely close to zero. Below Number.MIN_VALUE, mainstream engines flush them to 0.
Return to the hub for static Number constants.
8 people found this page helpful