Favorites

JavaScript isFinite() Function

☕
Enjoying this site?

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

Buy us a coffee
isFinite()
JavaScript Global functionThis function is supported by all modern browsers.
Updated 28th November 2026

The isFinite() function checks whether a value is a finite number after converting it to a number.

Description

The global isFinite() function converts the value to a number and returns false if the result is NaN, Infinity or -Infinity. Use Number.isFinite() to check values without the type conversion.

Because of the conversion, isFinite(null) and isFinite('') are true, since both convert to 0. That makes it easy to accept empty input by mistake when validating forms.

It's still useful when you deliberately want to accept numeric strings. When the value should already be a number, Number.isFinite() is stricter and usually the better choice.

Syntax

isFinite(value)

Parameters

  • valueThe value to test. It is converted to a number first.

Return Value

true if the value is a finite number after conversion, otherwise false.

Example

console.log(isFinite(10 / 3));
console.log(isFinite(1 / 0));
console.log(isFinite('12'), Number.isFinite('12'));

Browser Support

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

This function 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