IPv6 Subnet Calculator
Calculate IPv6 subnet details including network address, address range, host count, and compressed notation. Supports all prefix lengths from /0 to /128.
IPv6 Subnet Calculator
Calculator
Adjust values & calculateEnter your values below. Every result is computed in your browser โ no data is sent to any server.
Formula: Network = Address AND PrefixMask | Hosts = 2^(128 - PrefixLength)
Worked example โ Network: 2001:db8:85a3:1:: | Last: 2001:db8:85a3:1:ffff:ffff:ffff:ffff
Formula
Network = Address AND PrefixMask | Hosts = 2^(128 - PrefixLength)
The network address is derived by masking the input address with the prefix length, zeroing out all host bits. The number of available addresses equals 2 raised to the power of host bits (128 minus prefix length). For a standard /64 subnet, this yields 2^64 addresses.
Worked Examples
Example 1: Standard /64 Subnet Calculation
Problem:Given the IPv6 address 2001:0db8:85a3:0001:0000:8a2e:0370:7334 with a /64 prefix, find the network and address range.
Solution:Full address: 2001:0db8:85a3:0001:0000:8a2e:0370:7334 Network prefix (first 64 bits): 2001:0db8:85a3:0001 Network address: 2001:0db8:85a3:0001:0000:0000:0000:0000 Last address: 2001:0db8:85a3:0001:ffff:ffff:ffff:ffff Host bits: 64 | Addresses: 2^64 = 18,446,744,073,709,551,616
Result:Network: 2001:db8:85a3:1:: | Last: 2001:db8:85a3:1:ffff:ffff:ffff:ffff
Example 2: ISP /48 Allocation Breakdown
Problem:An organization receives 2001:0db8:abcd::/48. How many /64 subnets can be created?
Solution:Prefix length: 48 bits Bits available for subnetting: 64 - 48 = 16 bits Number of /64 subnets: 2^16 = 65,536 Network range: 2001:0db8:abcd:0000:: to 2001:0db8:abcd:ffff:: Each /64 subnet has 2^64 host addresses
Result:65,536 subnets of /64 available | Total addresses: 2^80
Frequently Asked Questions
What is IPv6 subnetting and how is it different from IPv4?
IPv6 subnetting divides the massive one hundred twenty-eight bit IPv6 address space into smaller, manageable network segments. Unlike IPv4 which uses thirty-two bit addresses providing about four point three billion addresses, IPv6 provides approximately three hundred forty undecillion addresses. The most significant difference is scale: a standard IPv6 subnet with a sixty-four bit prefix contains over eighteen quintillion addresses, roughly four billion times the entire IPv4 address space. IPv6 subnetting does not use subnet masks like IPv4; instead it uses prefix length notation exclusively. The recommended minimum allocation for an end-user subnet is a /64 prefix, which allows stateless address autoconfiguration to function properly with the sixty-four bit interface identifier.
What is the standard IPv6 prefix length for subnets?
The standard prefix length for IPv6 subnets is sixty-four bits, written as /64. This convention is strongly recommended by the Internet Engineering Task Force and is essential for several IPv6 features to work correctly, including Stateless Address Autoconfiguration, Neighbor Discovery Protocol, and various security mechanisms. A /64 prefix leaves sixty-four bits for the interface identifier, providing over eighteen quintillion unique host addresses per subnet. Internet service providers typically receive a /32 or /48 allocation from regional internet registries. Residential customers usually receive a /48 or /56 prefix, allowing them to create sixty-five thousand or two hundred fifty-six individual /64 subnets respectively within their allocated space.
How do you compress and expand IPv6 addresses?
IPv6 addresses can be compressed using two rules to make them shorter and easier to read. The first rule allows removing leading zeros within each sixteen-bit group, so 2001:0db8:0000:0042 becomes 2001:db8:0:42. The second rule allows replacing one or more consecutive groups of all zeros with a double colon, but this can only be used once per address to avoid ambiguity. For example, 2001:0db8:0000:0000:0000:0000:0000:0001 compresses to 2001:db8::1. To expand a compressed address, reverse these steps by restoring leading zeros and expanding the double colon into the appropriate number of zero groups to total eight groups of four hexadecimal digits.
What is the difference between network address and host address in IPv6?
In IPv6, the network address (also called the network prefix or subnet identifier) is the portion of the address determined by the prefix length, with all remaining host bits set to zero. The host portion (interface identifier) occupies the remaining bits after the prefix and uniquely identifies a specific device within that subnet. For a /64 subnet, the first sixty-four bits represent the network and the last sixty-four bits represent the host. Unlike IPv4, there is no broadcast address in IPv6; instead, multicast addresses serve similar purposes. The network address itself with all host bits zeroed is called the subnet router anycast address and is reserved for router communication within that particular subnet segment.
How are IPv6 addresses allocated to organizations and end users?
IPv6 address allocation follows a hierarchical structure managed by the Internet Assigned Numbers Authority and five Regional Internet Registries worldwide. IANA allocates large blocks to RIRs, which then assign them to Internet Service Providers and large organizations. A typical ISP receives a /32 prefix, giving them over sixty-five thousand /48 blocks to distribute. Organizations and business customers typically receive a /48 prefix, providing sixty-five thousand five hundred thirty-six /64 subnets for internal network segmentation. Residential customers commonly receive a /56 prefix with two hundred fifty-six /64 subnets, or sometimes a /48 for more generous allocations. This generous allocation policy eliminates the address scarcity problems that plagued IPv4 and removes the need for network address translation.
Why do point-to-point router links often use a /127 prefix?
On a link that joins exactly two routers, a /64 costs nothing in address terms but exposes the link to neighbor discovery cache exhaustion: an attacker sweeping the enormous host range forces the router to hold huge numbers of incomplete NDP entries. RFC 6164 therefore recommends configuring /127 on inter-router point-to-point links, which yields exactly two usable addresses and removes that scanning surface. Operators commonly still reserve a whole /64 in the address plan and number the link from its first /127.
What is the difference between global unicast, link-local, and unique local addresses?
Global unicast addresses come from 2000::/3 and are routable across the public internet. Link-local addresses sit in fe80::/10, are configured automatically on every IPv6-enabled interface, and never leave the local link; Neighbor Discovery and router advertisements depend on them, which is why they need a zone index such as fe80::1%eth0. Unique local addresses use fc00::/7, in practice fd00::/8 with a 40-bit pseudo-random global identifier, giving private internal addressing without resorting to network address translation.
How is the 64-bit interface identifier of an IPv6 address generated?
Three schemes are common. Modified EUI-64 expands a 48-bit MAC address by inserting fffe between its two 24-bit halves and inverting the universal/local bit, bit seven of the first octet, so 00:1a:2b:3c:4d:5e becomes 021a:2bff:fe3c:4d5e. Because that exposes hardware identity across networks, privacy extensions generate random temporary identifiers that rotate periodically, and stable-privacy addressing derives a per-prefix pseudo-random identifier that stays constant on one network. DHCPv6 or manual configuration can also set the identifier directly.
Why should an IPv6 addressing plan align to nibble boundaries?
Each hexadecimal digit in an IPv6 address represents exactly four bits, one nibble. When subnet boundaries fall on multiples of four bits, such as /48, /52, /56, /60 and /64, the subnet identifier lines up with whole hex digits, so networks can be read, aggregated and filtered by eye without converting to binary. Boundaries such as /50 or /61 are technically valid but split a digit, which makes route summarization and access-list troubleshooting noticeably more error-prone.
What is DHCPv6 prefix delegation and how does it shape subnet planning?
Prefix delegation lets a customer edge router request an entire block rather than a single address: the provider's delegating router hands down, for example, a /56, and the customer router then numbers each internal LAN with its own /64 taken from that block. Planning therefore begins from the delegated prefix length, since a /56 yields 2^8 = 256 /64 segments and a /48 yields 2^16 = 65,536. The subnet identifier bits sit between the delegated prefix and the interface identifier.
References
Background & Theory
History
Reviewed for accuracy by Daniel Agrici, Founder & Lead Developer ยท Editorial policy
Related Calculators
๐งฎSubnet Calculator โ IPv4 Mask & Host Range
Calculate subnet with inputs, formulas, and instant results.
๐งฎBandwidth Time Transfer Calculator
Calculate bandwidth time transfer with inputs, formulas, and instant results.
๐งฎDownload Time Calculator
Calculate download time with inputs, formulas, and instant results.
๐งฎThroughput Efficiency Calculator
Calculate throughput efficiency with inputs, formulas, and instant results.
๐งฎBase64 Encode & Decode Calculator
Calculate base64encode decode with inputs, formulas, and instant results.
๐งฎHash Checksum Calculator
Calculate hash checksum with inputs, formulas, and instant results.