The only difference is this:

!isNan(1/0) // --> true
isFinite(1/0) // --> false

isNaN checks whether the argument is a number or not. The Infinities (+/-) are also numerical, thus they pass the isNaN check, but don't pass the isFinite check.

** Note that any string which can be parsed as a number ("2", "3.14") will cause isNaN to return false.

Hope this helps.

PS: The answer given by user1170379 was very nearly perfect.

Answer from kumarharsh on Stack Overflow
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › isFinite
isFinite() - JavaScript - MDN Web Docs - Mozilla
July 8, 2025 - The isFinite() function determines whether a value is finite, first converting the value to a number if necessary. A finite number is one that's not NaN or ±Infinity. Because coercion inside the isFinite() function can be surprising, you may prefer to use Number.isFinite().
🌐
DEV Community
dev.to › kobbyowen › javascript-in-depth-isfinite-isnan-functions-cp6
JavaScript In Depth - isFinite & IsNaN Functions - DEV Community
November 1, 2021 - This behavior is so true that, ECMAScript documentation suggests that one of the reliable ways to check for NaN is the expression(x === x), which returns false only if x is a NaN. Mostly, to determine if a number is okay to be used in arithmetic operation without few surprises, you should find yourself using isFinite more than isNaN, since isFinite checks for NaN values and goes on to check for infinite values.
🌐
Alibaba Cloud
topic.alibabacloud.com › a › the-difference-between-isnan--and-isfinite--in-javascript_1_24_30320235.html
The difference between isNaN () and Isfinite () in JavaScript
Isfinite (number) is a JavaScript built-in function that determines whether a number object can be converted to a finite digit. The IsNaN NaN property is a special value that represents a non-numeric value.
🌐
MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Number › isFinite
Number.isFinite() - JavaScript - MDN Web Docs
July 10, 2025 - The Number.isFinite() static method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive Infinity, negative Infinity, nor NaN.
🌐
W3Schools
w3schools.com › jsref › jsref_isfinite_number.asp
JavaScript Number.isFinite() Method
The Global isFinite() Method · The Global isNaN() Method · The Number.isNaN() Method · The POSITIVE_INFINITY Property · The NEGATIVE_INFINITY Property · isFinite() returns true if a value is a finite number.
🌐
John Kavanagh
johnkavanagh.co.uk › home › articles › number.isnan(), number.isfinite(), and number.isinteger() in javascript
Number.isNaN(), Number.isFinite(), Number.isInteger() | John Kavanagh
May 14, 2026 - NaN stands for "Not a Number", but it is still of type number. That already sounds slightly ridiculous, which is probably why it confuses people so reliably. ... That gives NaN. The question then becomes: how do we check for it safely? ... That returns true. Why? Because the global isNaN() first tries to turn the value into a number, and only then checks whether the result is NaN.
🌐
Calculist
tc39wiki.calculist.org › es6 › number
ECMAScript Wiki - Number
(function (global) { var ... enumerable: false, writable: true }); })(this); The Number.isNaN function does hte same thing as the global es5 function isNaN except that it doesn't coerce its parameters....
🌐
JSGuides
jsguides.dev › reference › number › is-finite
Number.isFinite() | JSGuides
A simpler test for “is this a safe, usable number” is Number.isFinite(n) && !Number.isNaN(n), though Number.isFinite() alone already excludes NaN — the two checks are not redundant when you need to produce different error messages for the two cases. Number.isNaN() — check if value is NaN ·
Find elsewhere
🌐
CodeKraft
abdulapopoola.com › 2017 › 10 › 23 › why-you-should-not-use-isnan
Why you should not use isNaN in JavaScript – CodeKraft
August 20, 2021 - You should switch to Number.isNaN which is already supported by all major browsers except IE11 and also add a polyfill fallback (just in case). You should also know that isFinite uses isNaN internally and consequently suffers the same flaws.
🌐
GitHub
github.com › 30-seconds › 30-seconds-of-code › issues › 41
Validate number: use only isFinite? · Issue #41 · Chalarangelo/30-seconds-of-code
December 12, 2017 - Use !isNaN in combination with parseFloat() to check if the argument is a number. Use isFinite() to check if the number is finite.
Author   Chalarangelo
🌐
Code.mu
code.mu › en › javascript › manual › lang › isFinite
The isFinite function - a number checking in JavaScript
This is because these values are converted to numbers and not to NaN. If you need a really accurate check for a number that does not count a string of spaces, booleans and special values as a number - use the following isNumeric function: function isNumeric(num) { return !isNaN(parseFloat(num)) && isFinite(num); };
🌐
GeeksforGeeks
geeksforgeeks.org › javascript › how-to-check-whether-a-number-is-nan-or-finite-in-javascript
How to check whether a number is NaN or finite in JavaScript ? - GeeksforGeeks
September 16, 2024 - Note: For a more reliable check ... NaN and not just something that can't be coerced into a number. The isFinite() function checks if a number is finite. A finite number is one that is not Infinity, -Infinity, or ...
🌐
MathWorks
mathworks.com › matlab › mathematics › elementary math › constants and test matrices
isfinite - Determine which array elements are finite - MATLAB
TF = isfinite(A) returns a logical ... where they are infinite or NaN. If A contains complex numbers, isfinite(A) contains 1 for elements with finite real and imaginary parts, and 0 for elements where either part is infinite or NaN....
🌐
Luau RFCs
rfcs.luau.org › math-isnan-isfinite-isinf.html
math.isnan, math.isinf and math.isfinite for Math Library | Luau RFCs
Currently, determinating if a value is NaN requires non-obvious and non-semantic check x ~= x. Determining if a number is finite requires a verbose check that handles both NaN and Inf cases, typically like x == x & math.abs(x) ~= math.huge. Checking specifically for Infinity also requires a manual check like math.abs(x) == math.huge. Adding explicit math.isnan(x), math.isinf(x) and math.isfinite(x) functions brings Luau’s math library in line with modern languages (such as C++, JavaScript, Python, etc), improving code clarity, robustness and safety for mathemetical applications.
🌐
RDocumentation
rdocumentation.org › packages › base › versions › 3.6.2 › topics › is.finite
is.finite: Finite, Infinite and NaN Numbers
is.finite and is.infinite return a vector of the same length as x, indicating which elements are finite (not infinite and not missing) or infinite. Inf and -Inf are positive and negative infinity whereas NaN means ‘Not a Number’. (These apply to numeric values and real and imaginary parts of complex values but not to values of integer vectors.)
🌐
CodeShack
codeshack.io › home › references › javascript › number.isfinite()
JavaScript Number.isFinite() Method: Syntax, Parameters & Examples
June 23, 2026 - Number.isFinite("42") is false — it only accepts actual numbers. Use the Number. version for reliable validation. It's the natural guard after arithmetic that might overflow or divide by zero (1 / 0 is Infinity) or fail (parseInt("x") is NaN).
🌐
Codecademy
codecademy.com › docs › javascript › number methods › .isfinite()
JavaScript | Number Methods | .isFinite() | Codecademy
October 13, 2021 - The above example passes an Infinity, a NaN, and an integer value, into the Number.isFinite() method to verify if each value is finite or not.
🌐
GitHub
github.com › microsoft › TypeScript › issues › 4002
`isNaN` and `isFinite` should accept number or string · Issue #4002 · microsoft/TypeScript
July 23, 2015 - According to the ES5.1 spec (15.1.2.4, 15.1.2.5), isNaN(number) and isFinite(number) perform the ToNumber(number) abstract operation before checking if number coerces to NaN or ±Infinity.
Author   microsoft
🌐
Studytonight
studytonight.com › post › python-math-functions-isinf-isfinite-and-isnan
Python Math functions - isinf(), isfinite(), and isnan() - Studytonight
November 1, 2019 - It takes one argument and returns True if the argument is a valid python number. This number could be positive or negative. If the parameter passed is infinite or Nan (Not a number), it returns False.