IPinfo - Comprehensive IP address data, IP geolocation API and database

What Is CIDR?

CIDR

Overview of CIDR

Before CIDR, IP addresses were allocated in fixed-size blocks based on classes (A, B, C). This meant organizations often received far more addresses than they needed; for example, a company needing 1,000 IPs would be forced to take a Class B block of 65,536, leaving tens of thousands unused. This waste accelerated IPv4 exhaustion and made routing inefficient. CIDR addressed these issues by allowing IP address blocks to be divided into subnets of any size.

CIDR notation is written as an IP followed by a slash and a number (e.g., 192.168.1.0/24). The number after the slash is the prefix length: it tells you how many bits are fixed for that block. The remaining bits determine the number of addresses available. Examples:

  • /16 → 65,536 IPs (big block)
  • /24 → 256 IPs (small block)
  • /32 → 1 IP (a single IPv4 address)

As you can see, a shorter prefix length indicates a larger network, while a longer prefix length indicates a smaller subnet. While /8, /16, /24, and /32 are common, CIDR allows any prefix length from /0 to /32 in IPv4 (and /0 to /128 in IPv6).

To be more precise, each IPv4 address is 32 bits long (a series of 32 ones and zeros). The prefix length tells you how many of those bits are fixed and shared by every address in the block. The remaining bits can vary, which is what defines how many unique addresses the block contains. Example:

  • /16 → 16 bits fixed, 16 bits variable → 2^16 = 65,536 unique addresses.
  • /24 → 24 bits fixed, 8 bits variable → 2^8 = 256 unique addresses.

Why CIDR Is Important

CIDR makes IP allocation more efficient, prevents waste, and simplifies routing by letting routers group many small networks into a single larger route. Understanding CIDR notation is essential for working with IP addresses and network infrastructure.

How IPinfo Relates to CIDR

IPinfo provides IP address information in CIDR block format, defining the ranges of IP addresses associated with organizations, countries, and other attributes. We also offer a CIDR to IP Range Converter Tool.

Links to Related Documentation and Tooling

Additional Resources

We Define the Standard for IP Data Excellence

Access IPinfo’s peerless IP intelligence and make business decisions that enhance your security posture and protect your brand reputation.