IPv6 Address and Subnet Calculator
Calculate an IPv6 network from an address and prefix, then review canonical boundaries, child-prefix capacity and reverse DNS or EUI-64 guidance.{{ summaryTitle }} {{ summaryValue }} {{ summaryLine }} {{ badge.label }} {{ badge.value }}
{{ summaryAnnouncement }}
| Property | Value | Operational meaning | Copy |
|---|---|---|---|
| Correct the IPv6 input to restore subnet facts. | |||
| {{ row.property }} | {{ row.value }} | {{ row.meaning }} | |
Boundary interpretation
{{ boundaryNote }}
Reverse DNS
{{ reverseNote }}
Addressing practice
{{ addressingNote }}
Modified EUI-64 example
{{ subnet.eui64_address }}
This deterministic example exposes a stable interface identifier. Confirm the network's privacy and address-management policy before using it.
An IPv6 prefix divides a 128-bit address into a fixed network part and a remaining interface-identification part. The number after the slash gives the network width, so /48, /64, and /128 describe increasingly narrow ranges. Two addresses that look different after zero compression can still belong to the same prefix.
Prefix planning matters at several scales. An organisation may receive a large allocation, divide it into site prefixes, and then allocate one or more LAN prefixes inside each site. Every extra prefix bit doubles the number of equal child prefixes while halving the address space in each child. A /56 divided at /64, for example, produces 256 equal LAN prefixes.
- Address
- One 128-bit IPv6 value, often written with omitted leading zeroes and one
::compression marker. - Prefix length
- The count of leading bits that identify the network. It ranges from 0 through 128.
- Canonical subnet
- The network address after every bit beyond the prefix boundary has been cleared.
- Child prefix
- A smaller equal-size subnet made by borrowing bits from the remaining address space.
A /64 is the normal boundary for IPv6 stateless address autoconfiguration on an ordinary LAN, but it is not a universal rule for every link. Point-to-point links, loopbacks, delegated aggregates, and specialised designs may use other widths. Treat the calculated range as address mathematics, then check the routing, neighbour-discovery, host-addressing, and provider rules for the network where it will be used.
IPv6 has no broadcast address, so the first and last values are inclusive mathematical boundaries rather than IPv4-style network and broadcast reservations. Address scope also matters: documentation, link-local, unique-local, multicast, loopback, and global-unicast addresses do not have the same routing meaning. A subnet calculation cannot prove that an address is assigned, reachable, unique, or published in DNS.
How to Use This Tool:
Start with the address and the prefix source that represents the boundary you intend to examine.
- Enter one IPv6 literal in IPv6 address or CIDR. Include a slash suffix when Prefix source is set to use the CIDR suffix.
- Choose Use manual prefix when the address has no suffix or when you intentionally want to test another boundary, then enter a whole prefix from 0 through 128.
- Open Advanced only when you need subdivision or interface-ID planning. Enter a Child-prefix extension from 0 through 32 bits, and optionally provide a six-octet MAC address for a modified EUI-64 example.
- Read the canonical subnet and inclusive first-to-last range. If the reverse-DNS result names an enclosing prefix rather than an exact boundary, plan the delegation with the DNS operator before publishing records.
Interpreting Results:
The Canonical subnet is the most important value for routing and allocation work. Compare it with the assigned prefix, not with the unmasked address that was entered. The First address and Last address are both inside the range.
- Address capacity is the mathematical count of bit patterns. It does not say how many addresses should be assigned to hosts.
- Scope classifies the entered address range; it does not test reachability or ownership.
- Reverse-DNS zone is exact only when the prefix ends on a four-bit hexadecimal boundary. A non-nibble prefix needs a more deliberate delegation arrangement.
- Modified EUI-64 example is deterministic. Check the local privacy and address-management policy before using a MAC-derived identifier.
Technical Details:
Subnet boundaries are bit operations on an unsigned 128-bit value. Text compression changes only the spelling of the address; masking uses the same 128 bits after the literal has been expanded.
Formula Core
For prefix length p, the remaining width h determines the address count and the mask used to clear host bits.
The network value N clears those h bits from address A. The last value L sets all of them.
If b host bits are borrowed, the child width is p + b and the number of equal children is 2b. The accepted extension is 0 through 32 bits and cannot exceed the available host width.
Transformation Core
Several exact transformations accompany the mask. They solve different operational problems and should not be read as evidence that the resulting address is deployed.
| Transformation | Rule | Important limit |
|---|---|---|
| Canonical text | Lowercase hexadecimal, omit leading zeroes, and compress the longest first run of two or more zero hextets. | Text form does not alter the 128-bit value. |
| Reverse DNS | Reverse the fixed hexadecimal nibbles and append ip6.arpa.. | An exact zone cut requires p to be divisible by 4; otherwise the result is the nearest enclosing nibble boundary. |
| Modified EUI-64 | Flip the universal/local bit in the first MAC octet and insert ff:fe between the first and last three octets. | An example is produced only when a valid MAC is supplied and the subnet is no narrower than /64. |
For 2001:db8:1200:12ab::1/56, masking clears the low 72 bits and yields 2001:db8:1200:1200::/56. Borrowing eight bits produces child /64 prefixes and a count of 28 = 256. Values are retained exactly; the address count is displayed as a decimal integer rather than rounded scientific notation.
Limitations and Privacy Notes:
The calculation is local address arithmetic. It does not query routers, registries, DNS, DHCPv6, neighbour discovery, or an address-management system.
- A syntactically valid prefix may still be unassigned, unroutable, duplicated, filtered, or unsuitable for the intended link.
- The nearest enclosing reverse zone is not a complete delegation design for a non-nibble-aligned prefix.
- MAC-derived interface identifiers can be stable and linkable. Modern address plans often prefer stable opaque or temporary identifiers instead.
- Zone identifiers such as
%eth0are intentionally rejected because they describe a host interface context, not part of the IPv6 address.
References:
- RFC 4291: IP Version 6 Addressing Architecture, IETF, February 2006.
- RFC 5952: A Recommendation for IPv6 Address Text Representation, IETF, August 2010.
- RFC 3596: DNS Extensions to Support IP Version 6, IETF, October 2003.
- RFC 8064: Recommendation on Stable IPv6 Interface Identifiers, IETF, February 2017.
- How to add an IP address with ip address, Simplified Guide.