How the calculation works
An IP prefix such as 192.168.10.0/26 is an address plus a prefix length: the number of leading bits that name the network. The rest of the bits number the addresses inside it. The calculator does all the math on the 32-bit (IPv4) or 128-bit (IPv6) number, and accepts any address inside the network: it finds the network that address belongs to. For the background on the two address families, see IPv4 and IPv6 addresses.
IPv4 (CIDR, RFC 4632):
- Addresses in a /n = 2^(32 − n).
- Subnet mask: n one bits followed by zero bits; /26 is 255.255.255.192. A dotted mask is turned back into a prefix length, and must be ones followed by zeros.
- Wildcard mask: the mask with every bit flipped (0.0.0.63 for a /26).
- Network address: the address with the host bits set to 0 (address AND mask). Broadcast address: the host bits set to 1.
- Usable hosts = addresses − 2, because the network and broadcast addresses are reserved. Two exceptions: a /31 has 2 usable addresses, for point-to-point links (RFC 3021), and a /32 is a single host.
- Address type comes from the IANA special-purpose registries (RFC 6890): private (RFC 1918), shared address space for carrier-grade NAT (RFC 6598), loopback, link-local, documentation, multicast and so on. Anything else is public unicast.
IPv6 (RFC 4291):
- Addresses in a /n = 2^(128 − n), and the number of /64 subnets = 2^(64 − n) for n up to 64. IPv6 has no broadcast address, so the range runs from the network address to the address with every host bit set.
- Addresses are shown in the standard short form (RFC 5952): lowercase, no leading zeros in a group, and the longest run of zero groups written as
::. IPv4-mapped addresses keep the dotted part (::ffff:192.0.2.1). The expanded form shows all 32 hex digits.
Splitting makes equal subnets inside the network, always a power of two of them:
- By prefix length: a /n split into /m gives 2^(m − n) subnets.
- By number of subnets: the smallest prefix length that gives at least that many, so 5 subnets of a /24 means eight /27s.
- By hosts per subnet (IPv4): the smallest subnet whose usable hosts (addresses − 2) are enough; 2 hosts gives a /31 and 1 host a /32.
The first 16 subnets are listed; the rest are counted, with the last one shown.
Route summarization takes up to 16 prefixes of one family. Repeated prefixes and prefixes inside another entry are dropped, then:
- Exact summary: overlapping and adjacent ranges are merged, and each merged range is cut into the fewest aligned prefixes. It covers exactly the addresses in the list.
- Single supernet: the longest prefix that contains every entry, from the leading bits the lowest and highest addresses share. Over-coverage = addresses in the supernet − addresses in the list.
Worked example
One IPv4 subnet. 192.168.10.77/26:
- The /26 mask is 26 one bits: 255.255.255.192, wildcard 0.0.0.63. A /26 holds 2^6 = 64 addresses.
- 77 in binary is 01001101; clearing the last 6 bits gives 01000000 = 64, so the network is 192.168.10.64/26 and the broadcast address is 192.168.10.127.
- Usable hosts: 64 − 2 = 62, from 192.168.10.65 to 192.168.10.126. The address entered is host 13 in the network, and 192.168.0.0/16 makes it private (RFC 1918).
Splitting by hosts. 10.20.0.0/22 split into subnets of at least 100 hosts each: a /26 gives 62 usable hosts, too few, and a /25 gives 128 − 2 = 126. A /22 holds 2^(25 − 22) = 8 /25 subnets, from 10.20.0.0/25 (hosts 10.20.0.1 to 10.20.0.126) to 10.20.3.128/25.
IPv6 prefix planning. 2001:db8:4400::/48 holds 2^(64 − 48) = 65,536 /64 subnets. Split into /56s, it gives 2^8 = 256 /56 prefixes, each with 2^8 = 256 /64s: 2001:db8:4400::/56, 2001:db8:4400:100::/56, 2001:db8:4400:200::/56 and so on to 2001:db8:4400:ff00::/56. Each /56 is one hex digit pair in the fourth group, which is why planning on 4-bit boundaries keeps the plan readable.
Route summarization. Five routes: 10.1.0.0/24, 10.1.1.0/24, 10.1.2.0/24, 10.1.3.0/24 and 10.1.5.0/24 (1,280 addresses).
- The first four are adjacent and start on a /22 boundary, so they merge into 10.1.0.0/22. 10.1.4.0/24 is missing, so 10.1.5.0/24 stays on its own. The exact summary is 2 routes: 10.1.0.0/22 and 10.1.5.0/24.
- The lowest address is 10.1.0.0 and the highest 10.1.5.255; they share their first 21 bits, so the single supernet is 10.1.0.0/21 (2,048 addresses). It also covers 10.1.4.0/24 and 10.1.6.0/23: 768 addresses not in the list, 37.5% of the supernet.
Reading the result
- Plan with room to grow. A subnet sized for today’s host count fills up when devices are added; a split by hosts per subnet gives the minimum, so consider the next size up for user VLANs.
- Check the over-coverage before advertising a supernet. Announcing or routing a prefix that covers addresses you don’t use can attract traffic you can’t deliver. The exact summary never does.
- Provider allocations come as prefixes. An ISP or IP transit provider assigns a block such as a /29 or a /48; the usable count above is what you can number devices with, and some providers also use one or more addresses in the block for their own router.






