Subnet (CIDR) calculator
Work out the network, broadcast, host range and masks for any IPv4 or IPv6 block, and split it into smaller subnets.
192.168.1.0/24 has 254 usable addresses, from 192.168.1.1 to 192.168.1.254. Private (RFC 1918).
| Network address | 192.168.1.0 |
|---|---|
| Prefix length | /24 |
| Subnet mask | 255.255.255.0 |
| Wildcard mask | 0.0.0.255 |
| Broadcast address | 192.168.1.255 |
| First usable host | 192.168.1.1 |
| Last usable host | 192.168.1.254 |
| Total addresses | 256 |
| Usable hosts | 254 |
| Address type | Private (RFC 1918) |
| Legacy class | C |
| Mask in hex | 0xffffff00 |
| Reverse DNS zone | 1.168.192.in-addr.arpa |
Binary
address 11000000.10101000.00000001.00000000
mask 11111111.11111111.11111111.00000000
network 11000000.10101000.00000001.00000000
^^^^^^^^ ^^^^^^^^ ^^^^^^^^The first 24 bits are the network part and the rest identify hosts.
Split into /26 subnets
4 subnets with 62 usable hosts each.
| Subnet | First host | Last host | Broadcast |
|---|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 | 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 | 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 | 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 | 192.168.1.254 | 192.168.1.255 |
Try 10.0.0.0/8, 172.16.0.0/12 or 2001:db8::/32.
How it works
A subnet is a block of IP addresses that share the same first bits. The prefix length says how many: /24 means the first 24 bits name the network and the rest name hosts. Enter an address and prefix (CIDR notation), and this page works out the rest. It handles IPv4 and IPv6 and updates as you type, in your browser.
Worked example. 192.168.1.0/24 has 256 addresses. The first (192.168.1.0) names the network and the last (192.168.1.255) is the broadcast address, which leaves 254 usable hosts, from 192.168.1.1 to 192.168.1.254. The mask is 255.255.255.0 and the wildcard mask, used in router access lists, is 0.0.0.255. Split into /26 networks, you get four with 62 hosts each.
- A /31 has two addresses and no broadcast (RFC 3021), and a /32 is a single address.
- IPv6 has no broadcast address, and every address in the block is usable. Most IPv6 networks are /64s.
- To see who owns a public address block, use the IP and network lookup.