how big does a number have to be for it to be called NaN
NaN is not about how big a number is. It means “Not a Number” and is used for values that are undefined or unrepresentable , such as 0/00/00/0 or other invalid floating-point results.
What NaN means
NaN appears when a calculation does not produce a valid numeric result, not when a number exceeds some size limit. For example, 0/00/00/0 is a classic case that yields NaN.
Big numbers are different
If a number is too large for a system to store, it usually becomes Infinity or causes overflow behavior, depending on the language or format—not NaN. NaN is specifically for invalid or undefined numeric results, not “very large” values.
Simple rule
- Too big to represent: usually Infinity or overflow.
- Not mathematically valid as a number: NaN.
If you want, I can also explain why typeof NaN is "number" in JavaScript.