In computing, Not a Number is a result typically indicating out-of-bounds input or output in floating point calculations. For example, a typical floating point unit is not designed to be able to calculate the square root of negative numbers, and will instead return a NaN result.

In floating point calculations, NaN is not the same as zero or infinity, although all three are typically handled as special cases in floating point representations of real numbers. It is also not the same as an overflow or underflow error.

See also: IEEE floating-point standard