Free CIDR calculator
CIDR Calculator
Type a CIDR block such as 192.168.1.0/24 to get its subnet mask, wildcard mask, network and broadcast address, usable host range and number of hosts. For /24 that is 255.255.255.0, wildcard 0.0.0.255 and 254 usable hosts.
Calculate a CIDR block
Result for 192.168.1.0/24
This is an example result. Type your own block above and press Calculate.
- CIDR notation
- 192.168.1.0/24
- Prefix length
- /24
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- Usable host range
- 192.168.1.1 – 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
Binary view
Coloured bits are the network part (24 bits); the grey bits are for hosts.
Split into two /25 blocks
| CIDR | Usable range | Usable hosts |
|---|---|---|
| 192.168.1.0/25 | 192.168.1.1 – 192.168.1.126 | 126 |
| 192.168.1.128/25 | 192.168.1.129 – 192.168.1.254 | 126 |
How CIDR notation works
CIDR writes a network as an address and a prefix length: /24 means the first 24 bits identify the network and the rest identify hosts. The longer the prefix, the smaller the network: a /24 holds 256 addresses, a /25 holds 128, a /26 holds 64.
To get the subnet mask, set the first n bits to 1: a /26 is 26 ones followed by 6 zeros, 11111111.11111111.11111111.11000000, which is 255.255.255.192. The wildcard mask is the same mask with every bit flipped, 0.0.0.63, as used in router access lists and OSPF.
Hosts per subnet: 2(32 − prefix) addresses, minus the network and broadcast address. A /31 keeps both addresses for point-to-point links and a /32 is a single host. Need to split a block? VLSM calculator, or plan subnets by number of devices.
CIDR to subnet mask chart: /16 to /32
| CIDR | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
Built and maintained by Bhavesh Vala. Last reviewed . Every calculation uses the same tested rules as the subnet planner, including /31, /32 and IPv6. About