How to use the subnet calculator
- Type an IPv4 address with a prefix (10.0.0.5/22) or with a dotted mask (10.0.0.5 255.255.252.0).
- Read the network, broadcast, first and last usable host and the host count.
- Pick a new prefix under Split to see the equal-sized subnets inside the block, with their ranges.
- For IPv6, enter an address with a prefix (2001:db8::/48) to get the compressed and expanded forms and the prefix size.
Features
- IPv4 CIDR and dotted-mask input, including /31 point-to-point and /32 host routes
- Network, broadcast, first and last host, usable hosts, netmask, wildcard mask and binary mask
- Address class and whether the block is private, loopback, link-local, CGNAT or public
- Subnet splitting into any longer prefix, with the first 64 subnets listed
- IPv6 compression (RFC 5952), expansion, network prefix and address count
CIDR in one paragraph
A /24 means the first 24 of the 32 bits identify the network and the remaining 8 identify hosts, giving 256 addresses. The lowest (all host bits zero) is the network address and the highest (all ones) is the broadcast address, so 254 remain for hosts. Each step up in prefix length halves the block: /25 is 128 addresses, /26 is 64, and so on. The netmask is the same idea written as dotted decimal (255.255.255.0 for /24); the wildcard mask is its inverse, used in some router ACL syntaxes.
- /31 networks (RFC 3021) use both addresses for a point-to-point link.
- /32 is a single host.
- IPv6 has no broadcast address and uses /64 for almost every LAN, however few devices are on it.