Last updated: March 2026
What Is CIDR Notation?
CIDR notation (Classless Inter-Domain Routing) is the standard way to express an IP address and its subnet mask in a single, compact format. Instead of writing 192.168.1.0 mask 255.255.255.0, you write 192.168.1.0/24. The number after the slash is the prefix length — the count of leading 1-bits in the subnet mask.
CIDR was introduced in 1993 to replace the rigid classful addressing system. Before CIDR, networks could only be /8 (Class A, 16 million hosts), /16 (Class B, 65,534 hosts), or /24 (Class C, 254 hosts). This inflexibility led to massive waste and rapid exhaustion of IPv4 addresses. CIDR allows any prefix from /0 to /32, enabling precise allocation.
How CIDR Prefix Lengths Work
An IPv4 address is 32 bits long. The CIDR prefix divides those 32 bits into two parts: network bits (identifying the subnet) and host bits (identifying devices within that subnet). A /24 prefix means 24 network bits and 8 host bits. Each additional bit in the prefix halves the number of available hosts.
The subnet mask is derived directly from the prefix length. A /24 produces a mask of 255.255.255.0 (24 ones followed by 8 zeros in binary). The wildcard mask is the bitwise inverse: 0.0.0.255. The color-coded binary display in this calculator makes this relationship visually clear.
Common CIDR Blocks
The most commonly encountered CIDR blocks are /24 (254 usable hosts, standard for small LANs), /16 (65,534 hosts, medium enterprise), and /8 (16.7 million hosts, the three private ranges). Point-to-point links between routers typically use /30 (2 usable hosts) or /31 (2 hosts, RFC 3021).
Cloud providers like AWS, Azure, and GCP commonly allocate VPCs in /16 blocks and subnets in /24 or /20 blocks. Understanding CIDR is essential for cloud networking, firewall rules, routing tables, and any network design work.
CIDR vs. Subnet Mask: When to Use Which
CIDR notation (/24) and dotted-decimal subnet masks (255.255.255.0) convey the same information in different formats. CIDR is more compact and is the standard in routing protocols, cloud consoles, and documentation. Dotted-decimal masks are used in device configuration (e.g., Windows network settings, some router interfaces). This calculator shows both formats side by side.