Tech
IPv6 Subnet Calculator
Parse any IPv6 address and prefix into its network address, total addresses, /64 subnet count, and address type (global, link-local, unique-local, multicast, loopback). 128-bit BigInt math, RFC 5952 compression, runs locally.
IPv6 address and prefix
Common prefix lengths
Network
2001:db8:85a3::/64
Documentation (2001:db8::/32)
Compressed address
2001:db8:85a3::8a2e:370:7334
Expanded address
2001:0db8:85a3:0000:0000:8a2e:0370:7334
Network address (compressed)
2001:db8:85a3::
Network address (expanded)
2001:0db8:85a3:0000:0000:0000:0000:0000
Prefix length
/64
Address type
Documentation (2001:db8::/32)
Private / scoped
No
Number of /64 subnets
1
Total addresses in subnet
18446744073709551616
About 1.84e19 addresses
Frequently Asked Questions about the IPv6 Subnet Calculator
How is IPv6 different from IPv4 in terms of address size?
IPv4 addresses are 32 bits long, which gives 2^32 (about 4.29 billion) total addresses. IPv6 expanded that to 128 bits, which is 2^128 (about 3.4 x 10^38) total addresses. That is a 79-octillion-fold increase, enough to assign trillions of unique addresses to every grain of sand on Earth. The bigger address means IPv6 is written as 8 groups of 4 hex digits separated by colons (for example 2001:0db8:85a3:0000:0000:8a2e:0370:7334) instead of the four decimal octets of IPv4.
Why is /64 the standard subnet size for an IPv6 LAN?
IPv6 reserves the lower 64 bits of every standard subnet for the interface identifier, which is what enables Stateless Address Autoconfiguration (SLAAC, RFC 4862) and EUI-64. Any prefix longer than /64 (for example /112 or /126) breaks SLAAC and a long list of protocols that depend on it (privacy extensions, ND, DHCPv6 PD). The result: ISPs hand out a /48 or /56 to a site, and the site slices that into multiple /64 LANs. A single /64 holds 2^64 (about 1.84 x 10^19) addresses, so running out of host bits inside a LAN is not something to plan around.
What are the IPv6 compression rules (the :: shorthand)?
Two rules. First, leading zeros inside any 16-bit group can be dropped (2001:0db8 and 2001:db8 are the same). Second, exactly one run of consecutive all-zero groups can be replaced with :: (2001:db8:0:0:0:0:0:1 becomes 2001:db8::1). The :: shorthand may appear at most once per address, otherwise the parser would not know how many zeros to insert on each side. RFC 5952 also picks the longest zero run and breaks ties toward the leftmost, which is what canonical tools produce.
What are the main IPv6 address types?
Four ranges cover almost everything you will see in practice. Global unicast 2000::/3 is the public, routable space (your ISP-assigned addresses live here). Link-local fe80::/10 is auto-configured on every IPv6 interface and only valid on the local link (used for neighbor discovery and routing protocols). Unique-local fc00::/7 is the IPv6 equivalent of RFC 1918 private space, routable inside your network but not on the public internet. Multicast ff00::/8 covers all multicast (there is no IPv6 broadcast). Outside those, you have loopback ::1, the unspecified address ::, IPv4-mapped ::ffff:0:0/96, and documentation 2001:db8::/32 used in examples and RFCs.
Why does a single /64 hold about 1.84 x 10^19 addresses?
A /64 leaves 128 - 64 = 64 host bits, so the subnet holds 2^64 = 18,446,744,073,709,551,616 addresses, which is about 1.84 x 10^19. To put that in perspective, the entire IPv4 address space is 2^32 (about 4.29 billion); 2^64 is 2^32 squared, so one /64 alone is more than 4 billion times the size of the whole IPv4 internet. That is why IPv6 subnetting plans optimize for ease of routing (always /64 on a LAN, /48 or /56 per site) instead of squeezing host counts the way IPv4 forced you to.