/reɪndʒ/

noun — “the span between what a system can hold and what it quietly refuses to remember.”

Range in computing is the set of values that can be represented within a given numeric system, data type, or storage format. It defines the lower and upper bounds of representable numbers before phenomena like overflow or underflow occur.

At its simplest, range is a structural constraint: every numeric type has a finite capacity determined by how many bits are allocated to it. Once those bits are fixed, the range is fixed as well.

// 8-bit signed integer range (two's complement)

minimum = -128
maximum = 127
range   = 256 distinct values

This example illustrates a key idea: range is not just about the endpoints, but about the total number of representable states. An 8-bit system encodes 2⁸ = 256 possible values, even if they map onto both positive and negative numbers.

In general, for unsigned integers, the range is straightforward:

// unsigned integer range

0 to (2^n - 1)

For signed integers using two’s complement, the range shifts slightly:

// signed integer range

-2^(n-1) to (2^(n-1) - 1)

Floating-point range behaves differently. Instead of a simple linear span, it is distributed across magnitudes using an exponent system defined by standards like IEEE 754. This allows representation of both extremely large and extremely small numbers, but introduces uneven spacing and precision loss.

Range is closely tied to representation density: integers have uniform spacing, while floats have variable spacing that becomes sparser as magnitude increases.

This leads to a subtle but important distinction:

  • Integer range is bounded and evenly spaced
  • Floating-point range is vast but unevenly distributed

Range also determines how a system behaves under stress. When a computation exceeds range, it triggers overflow; when it falls below usable magnitude, it triggers underflow. Between these extremes lies the usable numeric space.

// conceptual view

[ underflow | usable range | overflow ]
      0        finite space     ∞

In practical programming, range affects everything from loop counters to sensor data processing to financial systems. Choosing the wrong type can silently distort results long before obvious errors appear.

For example, a 16-bit integer might seem sufficient for small datasets, but accumulation or scaling can push values beyond its maximum, causing wraparound:

// range failure example

int16 max = 32767
max + 1 → -32768  (overflow due to range limit)

Range is also critical in floating-point error analysis. Even when values remain within range, they may lose precision near the extremes, meaning that “within range” does not always mean “accurate.”

This is why numeric design often involves balancing range against precision: increasing one often reduces the other within fixed storage sizes.

Conceptually, range is the “territory map” of a numeric system. It defines where values are allowed to exist, and where they begin to degrade, wrap, or vanish. Everything else—precision, overflow, underflow—happens at its edges.

Ultimately, range is not just a technical limit but a design decision: it shapes how a system perceives magnitude itself, deciding what is large, what is small, and what is simply out of reach.

See integer, float, overflow, underflow, IEEE 754, precision