About the CIDR Calculator
CIDR notation (RFC 4632) writes a network as an address and a prefix length: in 192.168.10.37/22 the first 22 bits name the network and the remaining 10 bits number the hosts. The netmask is those 22 one-bits written as an address (255.255.252.0); the wildcard mask used by Cisco ACLs and OSPF is its inverse (0.0.3.255). The network address has all host bits 0, the broadcast address has them all 1, and everything in between can be given to hosts — 210 − 2 = 1,022 here. Two prefixes are special: a /31 has no network or broadcast address and both of its addresses are usable on point-to-point links (RFC 3021), and a /32 is a single host.
The calculator accepts a prefix length, a dotted netmask or a wildcard mask, and rejects masks whose one-bits are not contiguous, such as 255.0.255.0. Besides the ranges it shows the binary form with the network/host boundary marked, the historical class, the purpose of the block from the IANA special-purpose registry — private (RFC 1918), carrier-grade NAT 100.64.0.0/10, loopback, link-local, documentation, multicast — and the in-addr.arpa zone for reverse DNS. IPv4 arithmetic is done on unsigned 32-bit integers, so /0 and 255.255.255.255 give correct results.
IPv6 prefixes are calculated with 128-bit integers. Addresses are printed in the canonical form of RFC 5952: lower-case hexadecimal, no leading zeros, and :: for the longest run of zero groups. You get the expanded form, the first and last address, the exact number of addresses, the number of /64 networks inside the prefix, the address type (global unicast, unique local fc00::/7, link-local fe80::/10, multicast, documentation 2001:db8::/32, IPv4-mapped) and the ip6.arpa zone. Everything runs in your browser.
How to use it
- Type an address with a prefix (192.168.10.37/22), a netmask (10.0.0.5 255.255.252.0), a wildcard mask, or an IPv6 prefix (2001:db8:abcd::1/56).
- Drag the prefix slider, or click a row of the prefix table, to see how the network changes.
- Read the network, host range and masks; copy any value with its Copy button.
- Enter another address to test whether it is inside the subnet.
- Choose a new prefix length under “Split into subnets” and copy the list of subnets.