Skip to main content

CIDR Calculator

What Is CIDR?

Classless Inter-Domain Routing (CIDR) is an IP addressing scheme that replaced the old classful system (Class A, B, C) in 1993. CIDR uses a variable-length prefix to define network boundaries, written as a slash followed by the number of network bits — for example, 10.0.0.0/16. This flexibility allows ISPs and organizations to allocate exactly the IP address space they need, rather than being forced into fixed class sizes. CIDR also enables route aggregation (supernetting), where multiple contiguous networks are advertised as a single route, dramatically reducing the size of internet routing tables. Without CIDR, the global routing table would be orders of magnitude larger and IPv4 exhaustion would have occurred much earlier.

CIDR Notation Explained

A CIDR block like 192.168.0.0/22 means the first 22 bits are the network prefix and the remaining 10 bits are for host addresses. The total number of addresses is always 2^(32 − prefix). So /22 gives 2^10 = 1,024 addresses (1,022 usable). The subnet mask equivalent is found by setting the first 22 bits to 1: 11111111.11111111.11111100.00000000 = 255.255.252.0. The wildcard mask (used in ACLs and firewall rules) is the bitwise inverse: 0.0.3.255. Every CIDR block has a network address (all host bits zero) and a broadcast address (all host bits one). Usable IPs fall between these two, except for /31 (RFC 3021 point-to-point) and /32 (single host route).