What does this calculator do?
This calculator takes an IPv6 address such as 2001:db8:abcd:1234::1 and a prefix length and returns the subnet it belongs to: the network prefix, the address in both its RFC 5952 compressed form and its fully expanded form, the first and last address of the prefix, the interface-identifier bit count and the size of the address space. All arithmetic uses arbitrary-precision integers, because a /64 already contains 2⁶⁴ addresses — far beyond what a double-precision number can represent exactly. IPv6 has no broadcast address, so none is shown; the last address of a prefix is an ordinary address, not a reserved one. Everything is computed in your browser from the values you type. Nothing is looked up on the network — there is no ping, no DNS query, no WHOIS and no geolocation.
Formula
The network is the address with the interface bits cleared; the size is a power of two.
interfaceBits = 128 − prefix totalAddresses = 2^(128 − prefix) network = address AND prefixMask lastAddress = network + 2^interfaceBits − 1
How to use it
Enter the IPv6 address in any legal form — compressed with :: , fully expanded, or with leading zeros — and a prefix length from 0 to 128. Colons stay exactly as written; nothing about IPv6 syntax is localised. Any address inside the prefix produces the same network, so a host address is fine. A /64 is the standard size for a LAN segment because SLAAC expects 64 interface bits.
Worked example
2001:db8:abcd:1234::1 with prefix /64 expands to 2001:0db8:abcd:1234:0000:0000:0000:0001. The network prefix is 2001:db8:abcd:1234::/64, the range runs from 2001:db8:abcd:1234:: to 2001:db8:abcd:1234:ffff:ffff:ffff:ffff, the interface identifier has 64 bits and the prefix contains 18,446,744,073,709,551,616 addresses.
Frequently asked questions
Where is the IPv6 broadcast address?
There is none. IPv6 removed broadcast entirely and replaced it with multicast — for example ff02::1 reaches all nodes on the link. The last address of an IPv6 prefix is a normal, assignable address.
Why is a /64 recommended for a LAN?
Stateless address autoconfiguration builds a 64-bit interface identifier, so it expects exactly 64 interface bits. Prefixes longer than /64 work for point-to-point links and loopbacks but break SLAAC on a normal segment.
What are the compressed and expanded forms?
The expanded form writes all eight 16-bit groups with four hex digits each. The compressed form follows RFC 5952: lowercase hex, leading zeros dropped, and the longest run of zero groups replaced by :: once. Both denote the same address.
Sources
- RFC 4632 — Classless Inter-Domain Routing (CIDR): the address-block, prefix-length and aggregation model used for every IPv4 subnet result on this page.
- RFC 3021 — Using 31-Bit Prefixes on IPv4 Point-to-Point Links: why a /31 has two usable addresses and no broadcast address, and why /32 is a single host.
- RFC 4291 — IP Version 6 Addressing Architecture: prefix and interface-identifier structure (IPv6 has no broadcast address). IPv6 output follows the canonical text form of RFC 5952.
- Reviewed: 2026-08-10
Related calculators
Last updated: 2026-08-10 · v1.0.0 · Report an error