IPv6 subnet calculator
Type a compressed, IPv4-embedded or zone-qualified IPv6 address and see the full and short form, the network address, the first and last address, the address count, the type and the reverse DNS name. Split a prefix into subnets and derive a SLAAC interface ID from a MAC address. The calculation runs in your browser.
Accepted: full or :: compressed, IPv4-embedded such as ::ffff:192.0.2.4, with a zone such as fe80::1%eth0, and [address]/prefix. Without a prefix, /128 (a single address) is used.
Calculated in your browser; the values you enter are not sent.
- Short form (RFC 5952)
- 2001:db8:abcd:12::5
- Full form
- 2001:0db8:abcd:0012:0000:0000:0000:0005
- Prefix
- /48
- Network address
- 2001:db8:abcd::/48
- Network address (full)
- 2001:0db8:abcd:0000:0000:0000:0000:0000
- First address
- 2001:db8:abcd::
- Last address
- 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
- Number of addresses
- 2^80 = 1,208,925,819,614,629,174,706,176 (≈ 1.2 × 10^24)
- Number of /64 subnets it holds
- 65,536
- Address type
- Documentation (2001:db8::/32 and 3fff::/20)
- Reverse DNS name (PTR)
- 5.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.1.0.0.d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa
- Reverse zone (for the prefix)
- d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa (/48)
The host bits of the address are not zero; the network address was calculated from the prefix: 2001:db8:abcd::/48.
IPv6 has no broadcast address; the first and last address are the ends of the range.
Split the prefix into subnets
For example split a /48 into /64s. The subnet prefix length cannot be shorter than the prefix you entered.
A /48 prefix yields 65,536 subnets of /64 (2^16). The first 8 are listed below.
| # | Subnet | Last address |
|---|---|---|
| 1 | 2001:db8:abcd::/64 | 2001:db8:abcd:0:ffff:ffff:ffff:ffff |
| 2 | 2001:db8:abcd:1::/64 | 2001:db8:abcd:1:ffff:ffff:ffff:ffff |
| 3 | 2001:db8:abcd:2::/64 | 2001:db8:abcd:2:ffff:ffff:ffff:ffff |
| 4 | 2001:db8:abcd:3::/64 | 2001:db8:abcd:3:ffff:ffff:ffff:ffff |
| 5 | 2001:db8:abcd:4::/64 | 2001:db8:abcd:4:ffff:ffff:ffff:ffff |
| 6 | 2001:db8:abcd:5::/64 | 2001:db8:abcd:5:ffff:ffff:ffff:ffff |
| 7 | 2001:db8:abcd:6::/64 | 2001:db8:abcd:6:ffff:ffff:ffff:ffff |
| 8 | 2001:db8:abcd:7::/64 | 2001:db8:abcd:7:ffff:ffff:ffff:ffff |
… and 65,528 more subnets
SLAAC interface ID from a MAC (EUI-64)
ff:fe is inserted into the middle of the MAC address and the universal/local bit (0x02) of the first octet is flipped (RFC 4291 appendix A).
If you enter one, the full address is produced as well. The prefix must be exactly /64.
- MAC (normalised)
- 00:25:96:12:34:56
- Interface ID (64 bit)
- 225:96ff:fe12:3456
- Link-local address
- fe80::225:96ff:fe12:3456
- Address (prefix + ID)
- 2001:db8:abcd:12:225:96ff:fe12:3456
The U/L bit of the MAC is 0: a universally administered, vendor-assigned address.
Many operating systems use temporary (RFC 4941) or stable opaque (RFC 7217) interface IDs for global addresses instead of EUI-64, because EUI-64 exposes the device's MAC address on every network. This section is for network documentation and older devices.
What we calculate and how
- Network address = address AND mask; the mask is 128 bits with the first p bits set to 1 and the remaining 128−p bits 0. Last address = network address OR (2^(128−p) − 1).
- Address count = 2^(128−p). Number of /64 subnets = 2^(64−p) (if p ≤ 64). Calculations use integers (BigInt) with no rounding.
- Short form (RFC 5952): lower case, no leading zeros, the longest run (at least 2) of zero groups becomes '::', the first run on a tie.
- Reverse DNS: the 32 hexadecimal digits in reverse order, separated by dots, followed by .ip6.arpa. A reverse zone name exists only for prefixes that are a multiple of 4.
- EUI-64: MAC (6 bytes) → first 3 bytes + ff:fe + last 3 bytes; the 0x02 bit of the first byte is flipped.
This tool does addressing arithmetic; it does not check how your network is actually routed, whether addresses are assigned, or which prefix your provider gave you. The address type is classified by common ranges based on the IANA special-purpose address registries; those registries can change over time. Results are for planning; verify them in your own environment before applying them to a live network.
Shall we review your IPv6 address plan, your subnet structure and your dual-stack migration together?
Request a meeting01
How to use
A
Type the IPv6 address with its prefix length (for example 2001:db8:abcd:12::5/48). Compressed, IPv4-embedded and %zone forms are accepted; if there is an error, the character position is shown.
B
In the result read the full and short form, the network range, the address count, the address type and the reverse DNS name; the network address is calculated from the prefix.
C
If you like, split a /48 into /64s in the "Split the prefix into subnets" section, derive an interface ID from a MAC address in the "EUI-64" section, and copy the result.
02
Writing and reading IPv6 addresses
An IPv6 address is 128 bits, written in hexadecimal as eight groups of 16 bits. Leading zeros in each group can be dropped and one run of consecutive zero groups can be shortened once to '::'. RFC 5952 recommends a single short form: lower case, the longest zero run shortened, the first on a tie, and a single zero group is not replaced by '::'. The same address can therefore be written in several ways; for comparison and records the short form is preferred.
The last 32 bits may also be written as a dotted IPv4 address (::ffff:192.0.2.4). A zone ID (fe80::1%eth0) says which interface is meant; it is needed for link-local addresses but is not part of the network calculation.
03
Prefix, subnet and /64
The prefix length p says that the first p bits of the address identify the network; the remaining 128−p bits are the host part. IPv6 has no broadcast address and a subnet has no address set aside as "network" or "broadcast"; the tool shows the first and last address of the range. The usual subnet for a local network segment is a /64: SLAAC assumes a 64-bit interface ID. A site typically receives a /48, /56 or /60 from its provider and gives each segment a /64, which is why a /48 yields 65,536 /64s.
The splitting section helps with this planning: it shows how many subnets of the chosen length a prefix yields and lists the first ones. Because the IPv6 address space is plentiful, what matters in subnets is not "saving" addresses but keeping the address plan understandable and summarisable.
04
Address types, reverse DNS and EUI-64
The address type follows from the prefix: fe80::/10 is link-local, fc00::/7 unique local (ULA; fd00::/8 in use), ff00::/8 multicast, 2000::/3 global unicast, and 2001:db8::/32 is reserved for documentation and is not routed on the internet. ::ffff:0:0/96 is an IPv4-mapped address, how IPv4 peers appear to applications on dual-stack sockets.
For reverse DNS the 32 hexadecimal digits of the address are written in reverse order followed by ip6.arpa; delegation is possible only at prefixes that are a multiple of 4 bits (one digit). EUI-64 derives a 64-bit interface ID from a MAC address; you meet it in network documentation and older devices, while most modern systems use temporary or stable opaque IDs for privacy.
FAQ
- Is the address I enter sent anywhere?
- No. The calculation runs as code in your browser; the address and MAC values are not sent to any server or stored.
- Does this replace the IPv4 subnet calculator?
- No, it complements it. IPv4 needs network and broadcast addresses, VLSM splitting and overlap checks; IPv6 has no broadcast address and splitting is usually done at the /64 boundary. This tool focuses on the IPv6 details.
- Why is a single zero group not shortened to '::'?
- RFC 5952 recommends that '::' not be used to shorten just one 16-bit zero group; at least two consecutive groups are needed. That way addresses such as "2001:db8:0:1:1:1:1:1" have one written form. When reading input the tool accepts '::' for a single group too; only the output follows the rule.
- Why do prefixes longer than /64 give a note?
- SLAAC (RFC 4862) uses a 64-bit interface ID and address autoconfiguration does not work on a prefix longer than /64. Long prefixes such as /127 are used on point-to-point links; the tool adds a note for these and does not treat them as errors.
- Why is there no reverse zone name for some prefixes?
- The ip6.arpa tree uses one label per hexadecimal digit, so it moves in 4-bit steps. For a prefix that is not a multiple of 4, such as /62, a single reverse zone cannot be defined; you use the nearest shorter zone (for example /60) or split it across several zones. The PTR name of a single address is always shown.
- Why is EUI-64 no longer recommended?
- An EUI-64 interface ID is derived from the device's MAC address and so makes the device trackable across networks. That is why client operating systems mostly use temporary (RFC 4941) or stable opaque (RFC 7217) IDs. You still meet EUI-64 in network documentation and some server and hardware configurations.
Is your IPv6 address plan ready?
Let us review your address plan, your subnet structure, your dual-stack migration and your firewall rules together. In a free discovery call we discuss where you stand and the migration steps.