Number.MIN_VALUE
Holds the smallest positive number JavaScript can represent, about 5e-324.
Number.MIN_VALUE- Added in JavaScript ES1
Return value
numberThe smallest positive representable number, 2^-1074 (approximately 5e-324) in all mainstream engines. The property is non-writable, non-enumerable and non-configurable.
Errors
Nothing on read; assigning to it throws a TypeError in strict mode, because the property is non-writable.
Changelog
- PHP Spec noteThe specification only requires "the smallest non-zero positive value that can actually be represented". Engines are not obliged to support denormalized numbers, so a conforming engine could report a larger value than 5e-324, though V8, SpiderMonkey and JavaScriptCore all report 2^-1074.
Despite the name, this is not the minimum number — it is the positive number closest to zero. The actual floor of the type is -Number.MAX_VALUE. Read MIN_VALUE as "minimum magnitude" and the naming stops being confusing.
Its value, 2**-1074, is a denormalized (subnormal) double. Subnormals trade significand bits for extra exponent range, which is why the smallest positive value reaches so much further below zero than MAX_VALUE reaches above it — but it also means values down there carry almost no precision at all.
When to reach for it
Rarely, and almost never as a tolerance. If you want to know whether two floats are close enough to call equal, the constant you want is Number.EPSILON (about 2.2e-16), which describes the gap between doubles near 1. MIN_VALUE is around 300 orders of magnitude smaller and will treat genuinely different values as equal.
What trips people up
Arithmetic at this scale is barely arithmetic. Number.MIN_VALUE / 2 is 0, while Number.MIN_VALUE * 0.6 rounds back up to Number.MIN_VALUE. Underflow is silent, exactly like overflow to Infinity: a product that gets too small just becomes zero, which can then turn a later division into Infinity.
Example
When to use it
- Explaining or testing underflow-to-zero behaviour in numeric code.
- Documenting the representable range of a double in a validation layer.
- Nudging a denominator away from exact zero when a guard must not change the result meaningfully.
Frequently asked questions
Is Number.MIN_VALUE negative?
No, it is positive — about 5e-324, the value closest to zero without being zero. The most negative number JavaScript can represent is -Number.MAX_VALUE, roughly -1.8e308.
Should I use Number.MIN_VALUE to compare floats for equality?
No, use Number.EPSILON. MIN_VALUE is roughly 5e-324 while typical rounding error near 1 is around 1e-16, so a MIN_VALUE tolerance is effectively the same as ===.
Why is MIN_VALUE 5e-324 rather than something like 1e-308?
Because it is a denormalized (subnormal) double: below the normal exponent range, doubles give up significand bits to keep shrinking. 1e-308 is roughly where normal doubles stop; subnormals carry on down to 2^-1074 with progressively less precision.
More examples
Underflow is as silent as overflow
The value walks 1e-100, 1e-200, 1e-300 and then collapses to 0 and stays there. No error, no NaN — the product simply passes below the smallest representable positive value. If a later step divides by t, the zero turns into Infinity and the fault surfaces somewhere unrelated.
let t = 1;
for (let i = 0; i < 5; i++) {
t = t * 1e-100;
console.log(i, t);
}MIN_VALUE is the wrong tolerance for float comparison
The rounding error in 0.1 + 0.2 is about 5.6e-17, which is enormous compared with MIN_VALUE (5e-324) but comfortably under EPSILON (2.2e-16). A tolerance built on MIN_VALUE rejects values that are as equal as doubles can get.
const a = 0.1 + 0.2;
console.log(a === 0.3); // false
console.log(Math.abs(a - 0.3)); // 5.551115123125783e-17
console.log(Math.abs(a - 0.3) < Number.MIN_VALUE); // false - too strict
console.log(Math.abs(a - 0.3) < Number.EPSILON); // true - the right scale
Discussion