CIDR Calculator
Convert any IPv4 CIDR block to its subnet mask, network address, broadcast, usable host range, wildcard mask, and total IP count. Pure client-side — nothing leaves your browser.
CIDR Quick Reference
| Prefix | Mask | Total IPs | Usable Hosts | Common Use |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 | Class A — large ISP / RIR |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Class B — campus / regional |
| /20 | 255.255.240.0 | 4,096 | 4,094 | Mid-size enterprise |
| /22 | 255.255.252.0 | 1,024 | 1,022 | RIR minimum allocation |
| /24 | 255.255.255.0 | 256 | 254 | Class C — small office / LAN |
| /27 | 255.255.255.224 | 32 | 30 | Department subnet |
| /29 | 255.255.255.248 | 8 | 6 | Point-to-point / small group |
| /30 | 255.255.255.252 | 4 | 2 | Router-to-router link |
| /32 | 255.255.255.255 | 1 | 1 | Single host route |
Need more variations? See the complete subnet cheatsheet for every prefix from /1 to /32.
How CIDR Works
CIDR (Classless Inter-Domain Routing) replaced classful addressing in 1993. A CIDR block like 10.0.0.0/24 packs two pieces of information: the network address (10.0.0.0) and the prefix length (/24) — the number of leading 1-bits in the subnet mask.
The prefix tells you how many bits identify the network versus the host. A /24 reserves 24 bits for the network and 8 bits for hosts, giving 28 = 256 addresses (254 usable: the first is the network address, the last is broadcast).
Two addresses are reserved in every IPv4 subnet larger than /31: the all-zeros host bits (network address) and all-ones host bits (broadcast). /31 and /32 are special — RFC 3021 allows /31 for point-to-point links (no broadcast), and /32 represents a single host.
The wildcard mask is the bitwise inverse of the subnet mask. Cisco ACLs use it; 0.0.0.255 is the wildcard for /24.
Frequently Asked Questions
What does the /24 in 192.168.1.0/24 mean?
The number after the slash is the prefix length — how many leading bits are fixed as the network portion. /24 fixes the first 24 bits, leaving 8 bits (256 addresses) for hosts.
How many usable hosts are in a subnet?
Total addresses minus 2 (the network and broadcast addresses) for any prefix shorter than /31. A /24 has 256 addresses and 254 usable hosts. /31 (point-to-point links, RFC 3021) and /32 (a single host) are special cases that use every address.
What is a wildcard mask?
The bitwise inverse of the subnet mask — it marks which bits may vary. A /24 has subnet mask 255.255.255.0 and wildcard mask 0.0.0.255. Wildcard masks appear in router ACLs and OSPF configuration.
What is the smallest and largest IPv4 CIDR block?
/32 is a single address; /0 covers the entire IPv4 space (all 4,294,967,296 addresses). The smaller the prefix number, the larger the block.