How CIDR works

Classless Inter-Domain Routing (CIDR) replaces the old "Class A/B/C" model with a flexible address/prefix notation. The prefix says how many leading bits identify the network; the remaining bits identify hosts inside it.

PrefixMaskHosts (usable)Use case
/24255.255.255.0254Typical home/office LAN
/23255.255.254.0510Doubled /24
/22255.255.252.01,022Small enterprise segment
/16255.255.0.065,534Old Class B; large private nets
/30255.255.255.2522Point-to-point links
/32255.255.255.2551Single host route

Private IPv4 ranges (RFC 1918)

FAQ

Why does /24 give 254 hosts and not 256?

The all-zeros address is the network address; the all-ones address is the broadcast. Both are reserved.

What does /31 mean?

Per RFC 3021, a /31 has exactly two usable addresses with no network or broadcast — used on point-to-point links.

What about IPv6 subnets?

IPv6 also uses CIDR notation. The conventional subnet size is /64, which gives 18 quintillion addresses per LAN. This tool focuses on IPv4 because of its higher arithmetic complexity for engineers.