NaN

Technology & Computing abbreviation · Programming

NaN
Stands forNot a number
CategoriesTechnology & Computing

NaN stands for Not a number, a programming abbreviation.

A special floating-point value representing an undefined or unrepresentable result, such as 0 divided by 0 or the square root of a negative number. JavaScript, Python, Java and databases produce it under IEEE 754 rules.

Example: The cart total shows NaN because the price field arrived as an empty string.

Usage notes

Defined by the IEEE 754 floating-point standard of 1985. NaN is not equal to anything, including itself, so code checks it with functions such as Number.isNaN() in JavaScript or math.isnan() in Python. In pandas data analysis, NaN commonly marks missing values.

More programming abbreviations

  • MATLAB – Matrix Laboratory
  • mkdir – Make directory
  • MQ – Message queue
  • MR – Merge request
  • MVC – Model-view-controller
  • MVVM – Model-view-viewmodel
  • NIH – Not invented here
  • NoSQL – Not only SQL
  • NPE – NullPointerException
  • npm – npm (often expanded as Node Package Manager)
  • OOM – Out of memory
  • OOP – Object-oriented programming

See all 154 programming abbreviations →