Integer

An integer is a number without a fraction or decimal component. It can be positive, negative, or zero. For example, -46, -1, 0, 5, and 3,278 are all integers, while -22.75, 3/4, √3, π, and 10.333 are not. The set of integers is infinite, extending in both the positive and negative directions.

In computer programming, an integer is a common data type used to store whole-number values. Integers may represent counters, quantities, scores, timestamps, and other values that do not require decimal places. They are often used as indexes that identify an element's position within an array or list, with 0 being the first value.

Computers typically store integers using a fixed number of bits, which limits the range of values they can represent. For example, a signed 32-bit integer typically ranges from -2,147,483,648 to 2,147,483,647. An unsigned integer does not represent negative values, allowing it to store a maximum value of 4,294,967,295.

Attempting to store a value outside an integer type's supported range may cause an overflow runtime error or produce an unexpected result.

Adding, subtracting, or multiplying two integers always produces another integer. Division may produce a fractional value, though the result depends on the programming language and data types involved. Some languages, like C++ and Java perform integer division by discarding the remainder, meaning 6 divided by 4 produces 1 instead of 1.5. A program may also round, truncate, or convert a decimal value when storing it as an integer.

Updated July 31, 2026 by Per C.

quizTest Your Knowledge

DOTA, Fortnite, and StarCraft competitions are collectively known as what?

A
Egaming
0%
B
Ematches
0%
C
Efighting
0%
D
Esports
0%
Correct! Incorrect!     View the Esports definition.
More Quizzes →

The Tech Terms Computer Dictionary

The definition of Integer on this page is an original definition written by the authors of TechTerms.com. If you would like to reference this page or cite this definition, please use the green citation bar directly below the definition.

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

The Tech Terms Newsletter

Improve your technical knowledge with our daily or weekly newsletter! Subscribe today and get new 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.