IPv4 and IPv6 subnet calculations: prefixes and boundaries
Read IPv4 subnet results, convert ranges to CIDR, and check IPv6 precision. Includes /24, /31 and /32 examples and a boundary checklist.
Start with an address and prefix
For 192.168.1.34/24, the network is 192.168.1.0, the mask is 255.255.255.0 and the broadcast is 192.168.1.255. The prefix counts network bits, not hosts.
The IPv4 calculator lists total addresses and usable hosts separately. A /31 is treated as two point-to-point endpoints; /32 represents one address. Check device support before applying a plan.
Ranges and blocks have different inputs
Range to CIDR accepts two IPv4 endpoints, such as 192.168.1.0 - 192.168.1.255. The output covers exactly that range without adding addresses.
CIDR aggregation removes redundant coverage and combines adjacent blocks. Two neighboring /25 blocks can form a /24. A gap between ranges is preserved.
IPv6 keeps its full precision
IPv6 normalization accepts :: and IPv4-mapped forms. Subnet arithmetic uses integers, so a /64 contains exactly 18446744073709551616 addresses.
The IPv6 calculator shows inclusive numeric boundaries, not a broadcast or a list of addresses assigned by a provider. IPv6 has no broadcast address. Zone identifiers such as %eth0 are unsupported; check allocation and routing before configuration.
No connection to the target address
These tools do not contact IP addresses or perform DNS, location or carrier lookups. Use membership checks to review an address before copying rules into another system.
Keep the source list and verify the first and last addresses before applying configuration changes. Tool output does not modify your network.
Read a /24 result field by field
For 192.168.1.34/24, the host portion occupies eight bits. Clearing those bits gives 192.168.1.0, and setting them gives 192.168.1.255. There are 256 total addresses; the ordinary /24 host convention reserves the network and broadcast addresses.
Do not apply that subtraction blindly to every prefix. The tool treats /31 as two point-to-point endpoints and /32 as one address. These calculations describe an address set, not whether a device is configured to use it or whether a host is reachable.
| Input | Total addresses | Interpretation |
|---|---|---|
| 192.168.1.34/24 | 256 | A complete /24 containing this address |
| 192.168.1.34/32 | 1 | Only this address |
| 192.168.1.34/31 | 2 | Point-to-point convention |
| 2001:db8::/64 | 18446744073709551616 | IPv6 address count, not a host inventory |
Before you finish
- Check one included address and one just outside the block.
- Retain full decimal strings for large IPv6 counts.
- Confirm which IPv6 addresses your provider actually routes or assigns; the prefix range alone cannot establish this.
- Do not merge blocks across gaps.
- Review the destination system’s prefix and rule semantics before applying output.
References
- RFC 4632: CIDR
Reference for classless address prefixes and aggregation.