Math.min() Minimum value
Last updated: 2026-09-09
Math.min() Minimum value
Math.min returns the smallest of the given numbers.
| Category | Math |
|---|---|
| ES version | ES1 |
📝 Syntax
Math.min(n1, n2, ...);
⚙️ Parameters
| n1..nN | Numbers to compare. |
|---|
Returns:The smallest value.
Mutates the original:No (returns a new value)
▶ Example
Edit the code, press Run, and see the result in the output panel:
Output:
1
-5
45
💡 Tip Math.min and Math.max combine for clamping: Math.min(Math.max(v, min), max).
🌐 Browser support
| Browser | |||||
|---|---|---|---|---|---|
| Math.min() | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported by all modern browsers | |||||
🏷️ Related Items
💡 Related Cases
More case studies coming soon — check back later.
📚 Related Tutorials
❓ FAQ
QMath.min() with no args?
AReturns Infinity.
QHow to clamp a value?
AMath.min(Math.max(value, min), max).
QCan it compare strings?
AYes — coerced to numbers.