Convert an IPv4 CIDR block to its address range, decompose a range into aligned blocks, split a network into subnets, and aggregate blocks into a supernet.
Usable hosts exclude the network and broadcast addresses. A /31 carries two usable addresses on a point-to-point link (RFC 3021) and a /32 is a single host.
| Prefix | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 |
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 |
You might also find these calculators useful
Prefix, address range, /64 count and IANA address type
Network, broadcast, mask and usable hosts for any IPv4 subnet
Effective MTU and TCP MSS from real protocol overhead
How much internet speed you need, and how long a transfer takes
Give this calculator a CIDR block and it returns the subnet mask, the network and broadcast addresses, the usable host range and the host count. Give it a pair of addresses and it returns the smallest set of CIDR blocks that covers them exactly. It also splits a block into equal subnets and aggregates several blocks into the smallest one that contains them. Every prefix from /0 to /32 is on the page as a cheat sheet, whether or not you calculate anything.
CIDR writes an address together with its routing prefix — 192.168.1.0/24. The number after the slash is how many leading bits identify the network; the remaining bits identify hosts inside it. A /24 leaves 8 host bits, so 2^8 = 256 addresses, of which 254 are usable once the network and broadcast addresses are set aside. CIDR replaced the fixed class boundaries of the original IPv4 design, which is why a modern subnet has a prefix length rather than a class.
Addresses in a block
Pick the prefix that fits the host count you need without stranding thousands of addresses. A /24 holds 254 hosts; a /22 holds 1,022.
Convert an address range your security team gave you into the CIDR blocks the rule syntax accepts, with no gaps and no overlap.
Divide one allocation into equal subnets and read each one's network, broadcast and host range.
Aggregate several blocks into the smallest one that covers them, and see exactly how many extra addresses that advertises.
Network address, broadcast address, first and last usable host, wildcard mask and the binary mask, from one CIDR block.
Turn a start and end address into the minimal set of aligned CIDR blocks — the shape a firewall or route table actually wants.
Private, loopback, link-local, carrier-grade NAT, documentation and reserved ranges are identified from IANA's IPv4 Special-Purpose Address Registry, not from a guess about the first octet.
All 33 prefixes with mask, wildcard, address count and usable hosts — visible before and after you calculate, with your prefix highlighted.
The first 24 bits are the network prefix, leaving 8 bits for hosts. That is a 255.255.255.0 mask, 256 addresses and 254 usable hosts — the network address and the broadcast address are not assignable to a host.
2^(32 − prefix) − 2 for any prefix up to /30. The two exceptions are at the bottom: a /31 carries two usable addresses on a point-to-point link under RFC 3021, and a /32 is a single host.
No. Private address space is exactly three blocks — 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16, defined in RFC 1918. 127.0.0.0/8 is loopback, a separate reservation under RFC 1122. Both are unreachable from the internet, but they are not the same thing, and 100.64.0.0/10 is a third category again: shared address space for carrier-grade NAT.
CIDR is the notation and the routing model; VLSM is the practice of using different prefix lengths inside one network, which CIDR is what makes possible. Splitting a /16 into a /24 for one site and a /28 for a point-to-point link is VLSM, written in CIDR.
Subnetting borrows whole bits, and each bit doubles the count. Three borrowed bits give 8 subnets; two give 4. Asking for 5 rounds up to 8, and the extra three stay unallocated rather than being distributed.
Not for addressing. CIDR replaced class A, B and C boundaries in 1993, and no current routing protocol infers a prefix length from the first octet. The terms survive in exam syllabuses and in conversation, which is why this calculator reports the prefix and the IANA special-purpose status instead of a class.