CIDR subnet calculator
Enter an IPv4 or IPv6 address with a prefix length. See its network range, split it into smaller prefixes, or check an address for membership.
Calculate IPv4 and IPv6 ranges locally. JavaScript is required for interactive results.
How it works
RFC 4632 and RFC 4291 define a prefix as the leftmost address bits. IPv4 has 32 bits; IPv6 has 128. The mask keeps prefix bits and clears host bits. The wildcard is the inverse mask within the address width.
total = 2^(address bits − prefix length) network = address AND mask last = network + total − 1 number of equal subnets = 2^(new prefix − old prefix)
All arithmetic uses BigInt with no rounding. For ordinary IPv4 subnets, usable bounds exclude network and broadcast. RFC 3021 makes both /31 addresses host addresses on a point-to-point link; /32 is a single host route. These are arithmetic conventions, not an allocation or routing check.
IPv6 has no broadcast. We show range bounds, not a universal “usable host” count: anycast and special-use reservations depend on context. IPv6 output follows RFC 5952: lowercase, no leading zeros, and the first longest zero run compressed; a single zero group stays explicit. IPv4-mapped addresses use mixed notation. Expanded output uses all eight groups.
The local display limit is 256 subnets. Larger splits show the exact total and clearly mark omitted rows. Each text field is limited to 256 characters or less.
Worked examples
IPv4 /26
192.168.1.130/26 normalizes to 192.168.1.128/26. It contains 64 addresses; usable bounds are 192.168.1.129–192.168.1.190 (62 addresses). Broadcast is 192.168.1.191, mask is 255.255.255.192, and wildcard is 0.0.0.63. Splitting to /28 gives 4 subnets starting at .128, .144, .160 and .176.
IPv6 /64
2001:db8::1234/64 has network 2001:db8:: and 18,446,744,073,709,551,616 addresses. Its final address is 2001:db8::ffff:ffff:ffff:ffff. Splitting to /66 gives 4 subnets.
Point-to-point /31
192.0.2.10/31 contains 2 endpoints: 192.0.2.10 and 192.0.2.11. Both are usable on a point-to-point link, with no directed broadcast.
Frequently asked questions
Does the address need to be the network address?
What is different about /31 and /32?
Does IPv6 have a broadcast address?
Can I split into any number of equal CIDR subnets?
Does membership mean an address is assignable?
Are IPv6 zone IDs or ports accepted?
Sources
- W3C WAI — Forms Tutorial (checked 2026-11-14)
- RFC 4632 §3.1 — CIDR prefixes and address counts (checked 2026-11-14)
- RFC 4291 §2 — IPv6 addressing and prefix notation (checked 2026-11-14)
- RFC 5952 §4–5 — IPv6 text representation (checked 2026-11-14)
- RFC 3021 §2 — IPv4 point-to-point /31 links (checked 2026-11-14)
Last reviewed 2026-11-14. The method is written out above so you can check our math.