Favorites

JavaScript Math.min() Method

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
Math.min()
JavaScript Math Static methodThis method is supported by all modern browsers.
Updated 28th November 2026

The Math.min() static method returns the smallest of the numbers passed to it.

Description

The Math.min() static method returns the smallest of its arguments. Spread an array into it to find the array's minimum. With no arguments it returns Infinity.

Like Math.max(), it returns NaN if any argument isn't a number, and arrays must be spread rather than passed directly. For finding the object with the smallest value of a property, such as the cheapest product, use reduce(), or sort a copy of the array.

Combined with Math.max(), it's commonly used to clamp a value into a range, for example keeping a slider position between 0 and 100: Math.min(Math.max(value, 0), 100). Like every member of Math, it's called on the Math object itself rather than on a number, and it only works with the Number type: passing a BigInt throws a TypeError.

Syntax

Math.min(value1, value2, ...)

Parameters

  • value1, value2, ...Numbers to compare.

Return Value

The smallest number, Infinity with no arguments, or NaN if any argument can't be converted.

Example

console.log(Math.min(3, -2, 9));
const prices = [12.5, 9.99, 15];
console.log(Math.min(...prices));

Browser Support

The following information will show you the current browser support for the Math.min() method. Hover over a browser icon to see the version that first introduced support for this method.

This method is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee