This IPv6 subnet calculator takes one IPv6 address and a prefix length from 0 to 128 and prints the network that contains that address. The address may use one :: compression, or it may be written as eight groups. A group is one to four hexadecimal digits. Leading zeros inside a group are accepted, so 2001:0db8::1 is the same address as 2001:db8::1. Upper and lower case are both accepted. Every address the page prints is lowercase.
The address field may also end with a slash and a prefix. A separate prefix field is used when the address has no slash. If both are filled and the numbers differ, Calculate stops and clears the previous result. The prefix is an integer from 0 to 128 with no leading zero. 0 is valid. 08 is not.
The arithmetic is integer arithmetic on the 128-bit value. A JavaScript number cannot hold 2 to the power of 128, so the count is an exact integer. The network is the address with the host bits cleared. The first address is the network. The last address is the network plus the address count, minus 1. The address count is 2 to the power of 128 minus the prefix. A /0 has 340282366920938463463374607431768211456 addresses. A /127 has 2. A /128 has 1. The page does not subtract 2, and it does not print a broadcast row.
A /127 may add one note: both addresses are the point-to-point pair from RFC 6164. That note is not a usable-host line. Ordinary prefixes do not reserve two addresses the way an IPv4 /24 does.
The expanded form is eight groups with no leading zeros. A zero group is written as 0. The RFC 5952 line is the same address in the recommended text form: lowercase, no leading zeros, and the longest run of zero groups replaced by ::. A tie between two runs of the same length keeps the leftmost run. A single zero group is not compressed. The network, the first address, and the last address use that same RFC 5952 text.
The range line describes the address you typed, not a routing announcement. The first match wins, and the list is fixed: ::/128 is unspecified, ::1/128 is loopback, ::ffff:0:0/96 is IPv4-mapped, 64:ff9b::/96 is NAT64, 64:ff9b:1::/48 is local-use IPv4/IPv6 translation, 100::/64 is discard, 2001:db8::/32 is documentation, 2001:2::/48 is benchmarking, fc00::/7 is unique local, fe80::/10 is link-local, ff00::/8 is multicast, and 2002::/16 is 6to4. Any other address is labeled not in the special ranges on this page. That label is not a claim that the address is public, routed, reachable, or safe to use.
An invalid address, a dotted IPv4 tail, a zone id, a hostname, more than one ::, an empty group that is not part of ::, a prefix outside 0–128, or a slash that disagrees with the prefix field clears the table. The previous network does not stay on screen. Nothing is sent off the page.
2001:0db8::1 with prefix 32 produces expanded form 2001:db8:0:0:0:0:0:1, RFC 5952 text 2001:db8::1, network 2001:db8::, first address 2001:db8::, last address 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff, and address count 79228162514264337593543950336. The range line is documentation. The same network appears if the address field is 2001:DB8::1/32 and the prefix field is left empty. If the prefix field is also 32, the result matches. If the prefix field is 64, Calculate stops because the two prefixes disagree.
2001:db8::5/127 produces a count of 2, first address 2001:db8::4, last address 2001:db8::5, and the RFC 6164 point-to-point note. 2001:db8::5/128 produces a count of 1 and no point-to-point note. ::/128 is unspecified. ::1/128 is loopback. fe80::1/10 is link-local. fd12::1 is unique local. 2001:4860:4860::8888/32 is not in the special ranges on this page. ::ffff:192.0.2.1 is rejected because of the dotted tail. fe80::1%eth0 is rejected because of the zone id. 2001::db8::1 is rejected because it has two compressions. example.com is rejected because it is a hostname.
The calculation stays in the browser. The address is not stored. A result describes the prefix you typed. It does not tell you whether a host answers, which operator holds the space, or whether a packet would be delivered. The IPv4 subnet calculator is a different page because that family uses a broadcast address and a different host count.
IPv6 only. One address, with at most one ::. Groups are 1–4 hex digits. A dotted IPv4 tail and a zone id are rejected. Prefix 0–128, with no leading zero. Expanded form is eight groups. RFC 5952 text is lowercase, with the longest zero run compressed, and a tie keeps the leftmost run. A single zero group is not compressed. There is no broadcast row and the address count is not reduced by 2. A /127 may note the RFC 6164 point-to-point pair. It is not an IPv4 usable-host count. The range line uses a fixed list. Anything else says not in the special ranges on this page. That is not a public, routable, or safety claim. No DNS, geolocation, or IPv4.
No. The arithmetic stays in the browser. There is no DNS query, no geolocation, and no request to an address API.
IPv6 prefix arithmetic does not reserve a broadcast address, and this page does not subtract 2 from the address count. A /127 can note the RFC 6164 point-to-point pair. That note is not an IPv4 usable-host count.
The line says not in the special ranges on this page. That sentence is only the fixed list. It does not mean the address is public, routed, reachable, or safe.
A form such as ::ffff:192.0.2.1 mixes an IPv4 dotted tail into the IPv6 text. This page accepts hexadecimal groups only, so that tail is an error instead of a silent conversion.