Subnet Calculator
Enter a CIDR for IPv4 or IPv6. Calculations happen as you type, locally in your browser.
What is CIDR?
The 30-second version
CIDR (Classless Inter-Domain Routing) is just the format address/prefix. The prefix is how many bits of the address identify the network. The remaining bits identify hosts inside that network.
/24in IPv4 means 24 network bits, 8 host bits, so 256 addresses total (254 usable)./16means 65,536 addresses./32means a single address./0means "the entire internet".
IPv4 vs IPv6 vocabulary
In IPv4, the first address in a subnet is the "network" address and the last is the "broadcast" address. Neither is assigned to a host, which is where the "usable" count of 2^host_bits - 2 comes from.
IPv6 has no broadcast concept and no reserved addresses inside a subnet, so every address in the range is usable. The smallest prefix you typically assign to a real subnet is /64 because that's what stateless address autoconfiguration (SLAAC) expects.
Quick reference
- Private IPv4 ranges:
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16. - Loopback: IPv4
127.0.0.0/8, IPv6::1/128. - Link-local: IPv4
169.254.0.0/16, IPv6fe80::/10. - IPv6 unique-local:
fc00::/7(think "private" for IPv6).