Subnetting & Classless Inter-Domain Routing (CIDR)
Click a prefix length to highlight the network bits and instantly see the subnet mask and usable host capacity.
Select Network Prefix Length (/CIDR)
Each square represents one of the 32 bits in an IPv4 address. Selecting bit 24 highlights the first 24 bits as network bits (left to right).
Octet 1255
Octet 2255
Octet 3255
Octet 40
Network address192.168.1.0
Hosts254
First host address192.168.1.1
Last host address192.168.1.254
Broadcast address192.168.1.255
Current Selection
Network Bits: 24—Host Bits: 8
CIDR prefixes reserve the selected leading bits for network identification; remaining bits define host addresses within the subnet.
| CIDR | Subnet Mask | Subnets | Host Bits | Usable Hosts |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 16,777,216 | 8 | 254 |
CIDR Slider
CIDR Prefix
/24
Subnet Mask
255.255.255.0
Binary Mask
11111111.11111111.11111111.00000000
Usable Hosts
2(32 − 24) − 2 = 254
28 − 2 = 254
256 − 2 = 254
Hosts:254
| Address | Binary | IP |
|---|---|---|
| Network | 11000000.10101000.00000001.00000000 | 192.168.1.0 |
| First Host Address | 11000000.10101000.00000001.00000001 | 192.168.1.1 |
| Last Host Address | 11000000.10101000.00000001.11111110 | 192.168.1.254 |
| Broadcast | 11000000.10101000.00000001.11111111 | 192.168.1.255 |
CIDR Slider
Subnetting Chart
| CIDR | Subnet Mask | Subnets | Host Bits | Usable Hosts |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 1 | 32 | 4,294,967,294 |
| /1 | 128.0.0.0 | 2 | 31 | 2,147,483,646 |
| /2 | 192.0.0.0 | 4 | 30 | 1,073,741,822 |
| /3 | 224.0.0.0 | 8 | 29 | 536,870,910 |
| /4 | 240.0.0.0 | 16 | 28 | 268,435,454 |
| /5 | 248.0.0.0 | 32 | 27 | 134,217,726 |
| /6 | 252.0.0.0 | 64 | 26 | 67,108,862 |
| /7 | 254.0.0.0 | 128 | 25 | 33,554,430 |
| /8 | 255.0.0.0 | 256 | 24 | 16,777,214 |
| /9 | 255.128.0.0 | 512 | 23 | 8,388,606 |
| /10 | 255.192.0.0 | 1,024 | 22 | 4,194,302 |
| /11 | 255.224.0.0 | 2,048 | 21 | 2,097,150 |
| /12 | 255.240.0.0 | 4,096 | 20 | 1,048,574 |
| /13 | 255.248.0.0 | 8,192 | 19 | 524,286 |
| /14 | 255.252.0.0 | 16,384 | 18 | 262,142 |
| /15 | 255.254.0.0 | 32,768 | 17 | 131,070 |
| /16 | 255.255.0.0 | 65,536 | 16 | 65,534 |
| /17 | 255.255.128.0 | 131,072 | 15 | 32,766 |
| /18 | 255.255.192.0 | 262,144 | 14 | 16,382 |
| /19 | 255.255.224.0 | 524,288 | 13 | 8,190 |
| /20 | 255.255.240.0 | 1,048,576 | 12 | 4,094 |
| /21 | 255.255.248.0 | 2,097,152 | 11 | 2,046 |
| /22 | 255.255.252.0 | 4,194,304 | 10 | 1,022 |
| /23 | 255.255.254.0 | 8,388,608 | 9 | 510 |
| /24 | 255.255.255.0 | 16,777,216 | 8 | 254 |
| /25 | 255.255.255.128 | 33,554,432 | 7 | 126 |
| /26 | 255.255.255.192 | 67,108,864 | 6 | 62 |
| /27 | 255.255.255.224 | 134,217,728 | 5 | 30 |
| /28 | 255.255.255.240 | 268,435,456 | 4 | 14 |
| /29 | 255.255.255.248 | 536,870,912 | 3 | 6 |
| /30 | 255.255.255.252 | 1,073,741,824 | 2 | 2 |
| /31 | 255.255.255.254 | 2,147,483,648 | 1 | 0 |
| /32 | 255.255.255.255 | 4,294,967,296 | 0 | 0 |