What is an integer?

Last Updated on June 21, 2022

An integer is a whole number that can be either positive, negative, or zero. Whole numbers are the numbers you usually count and write with: 1, 2, 3, 4, 5. . . They also include zero: 0, 10, 20, 30. . .

In programming languages, an integer often refers to a 32-bit number, which means it can hold values ranging from -2,147,483,648 to 2,147,483,647.

Integer variables are very common in programs.