Understand the bits behind a subnet
A prefix is a boundary in an address. Move it by one bit and the block size changes by a factor of two.
Read the slash
IPv4 has 32 bits and IPv6 has 128. In a /24 IPv4 block, 24 bits identify the network and 8 remain for addresses within it. That gives 2⁸ = 256 total addresses. The same arithmetic applies to IPv6, where counts can be much larger than ordinary JavaScript numbers represent exactly. This calculator uses integer arithmetic and displays the exact count.
Total addresses are not always assignable hosts
Conventional IPv4 broadcast subnets reserve the network and directed broadcast addresses. A /31 can use both addresses on an RFC 3021 point-to-point link; a /32 is one address. Those are not universal guarantees for every device or special-purpose range. Assignment policy can impose other limits.
IPv6 has no broadcast address. We show inclusive first and last bounds, not a generic usable-host count. Subnet-router anycast and link-specific assignment rules still apply. A mathematical split does not mean a smaller IPv6 subnet is suitable for SLAAC; many standard LAN configurations use /64.
Follow the colors
The blue cells are network bits; the pale cells are host bits. The zeros and ones belong to the address you entered, not to a displayed mask. The normalized network clears its host bits. Entering a host address with a prefix is valid; the calculator finds the containing block.
Split without gaps or overlaps
Adding one prefix bit creates two equal, aligned child blocks. Adding four creates sixteen. The table includes every address in each child range, including any addresses excluded by host-assignment rules. We do not automatically configure routes, DHCP or firewall rules.
Your IP is an example, not a discovered network
The starting address is your public connection IP with an illustrative /24 or /64 prefix. A web request does not reveal your actual LAN subnet. Use the prefix from your network configuration for a real plan. All calculations stay in this browser.
Sources: CIDR addressing, IPv4 /31 point-to-point links, IPv6 addressing, IPv6 text representation.