Whole Number

A whole number is an integer that is 0 or greater. The first five whole numbers are 0, 1, 2, 3, and 4. They continue upwards to infinity.

Whole numbers are almost identical to natural numbers except they include 0. This is important in computer science since numeric ranges often begin with zero. For example, the first record in an array is 0, rather than one. 24-bit RGB color provides a range of 0 to 255 for red, green, and blue values. These values are represented by whole numbers rather than natural numbers because they include 0.

As the name implies, a whole number is not a fraction. It also cannot be negative. Since integers range from negative infinity to positive infinity, whole numbers are a subset of integers.

Updated June 19, 2018 by Per C.

Definitions by TechTerms.com

The definition of Whole Number on this page is an original TechTerms.com definition. If you would like to reference this page or cite this definition, you can use the green citation links above.

The goal of TechTerms.com is to explain computer terminology in a way that is easy to understand. We strive for simplicity and accuracy with every definition we publish. If you have feedback about the Whole Number definition or would like to suggest a new technical term, please contact us.

Want to learn more tech terms? Subscribe to the daily or weekly newsletter and get featured terms and quizzes delivered to your inbox.

Sign up for the free TechTerms Newsletter

How often would you like to receive an email?

You can unsubscribe or change your frequency setting at any time using the links available in each email.

Questions? Please contact us.