How to use the ipv6 subnet calculator
- Type or paste an IPv6 address into the input field. You can include a CIDR suffix like
/64or omit it to default to/128. - The tool immediately parses the address and computes the network prefix by masking the host bits.
- Review the output rows for the compressed network address, expanded form, first and last address, total addresses and the number of /64 subnets.
How the IPv6 CIDR Calculator Works
An IPv6 address is a 128-bit integer. The CIDR prefix length tells you how many leading bits belong to the network portion. To find the network address, the calculator creates a bitmask with the first n bits set to 1 and the remaining 128 - n bits set to 0, then applies a bitwise AND against the full address.
For example, with 2001:db8:abcd:12::/48, the first 48 bits are kept and the remaining 80 bits become zero. The total number of addresses in that subnet is 2^(128 - 48), which equals 280 or 1,208,925,819,614,629,174,706,176. Because JavaScript numbers lose precision beyond 253, this ipv6 subnet mask calculator uses BigInt arithmetic internally to guarantee exact results for every prefix length.
Compressed vs Expanded Notation
RFC 5952 defines the canonical text representation for IPv6. The compressed form drops leading zeros in each 16-bit group and replaces the longest run of consecutive all-zero groups with a double colon (::). The expanded form writes out all eight groups with four hexadecimal digits each.
Both forms represent the same 128-bit value. Network engineers typically use the compressed form in configuration files because it is shorter, while the expanded form is useful when comparing addresses visually or writing firewall rules where explicit alignment matters. This subnet mask calculator ipv6 tool outputs both so you can copy whichever format your workflow requires.
Common IPv6 Prefix Lengths
Unlike IPv4, where subnet sizes vary widely, IPv6 conventions standardize on specific prefix lengths. The table below lists the most common ones.
| Prefix | Total Addresses | Typical Use |
|---|---|---|
| /32 | 296 | ISP allocation from RIR |
| /48 | 280 | End-site allocation |
| /56 | 272 | Residential customer (some ISPs) |
| /64 | 264 | Standard single subnet (SLAAC requires /64) |
| /127 | 21 | Point-to-point inter-router links |
| /128 | 1 | Single host route or loopback |
A critical rule is that Stateless Address Autoconfiguration (SLAAC) requires a /64 prefix. If you assign a longer prefix such as /120 to a LAN segment, SLAAC will fail and clients must rely on DHCPv6 instead. When planning subnets, always count how many /64 blocks fit inside your allocation using an ipv6 cidr calculator like this one.
Practical Uses for a CIDR Calculator IPv6 Tool
Network architects use a cidr calculator ipv6 utility when designing addressing plans for large organizations. Given a /32 allocation from a regional internet registry, you need to divide it into /48 site prefixes, then further into /64 subnets for individual VLANs or segments. Knowing exactly how many /64s exist in your block prevents overlapping assignments.
Firewall administrators also benefit when writing access control lists. Verifying the network address and broadcast equivalent ensures rules match the intended scope. For those working across protocol versions, pairing this tool with an IPv4 to IPv6 converter helps map legacy ranges into dual-stack configurations. You can also check contiguous boundaries with an IP range calculator.
Edge Cases and Common Mistakes
The double colon (::) can appear only once in an address. Writing 2001::db8::1 is invalid because the parser cannot determine how many zeros each :: represents. Another frequent mistake is confusing the prefix length with a dotted-decimal subnet mask. IPv6 does not use dotted masks; the slash notation is the only standard.
When entering an address without a prefix, the assumed length is /128, meaning a single host. Always include the slash if you intend a subnet. Finally, remember that the first address in any IPv6 subnet is the network identifier and there is no reserved broadcast address as in IPv4. All addresses within the prefix are usable for unicast or anycast assignment.
Worked examples
| Example | Input | Result |
|---|---|---|
| Standard /64 subnet | IPv6 address or prefix (CIDR): 2001:db8:abcd:12::/64 | Network Address: 2001:db8:abcd:12::; Prefix Length: /64; Expanded Network: 2001:0db8:abcd:0012:0000:0000:0000:0000; First Address: 2001:db8:abcd:12::; Last Address: 2001:db8:abcd:12:ffff:ffff:ffff:ffff; Total Addresses: 18,446,744,073,709,551,616; Number of /64s: 1 |
| ISP allocation /32 | IPv6 address or prefix (CIDR): 2001:db8::/32 | Network Address: 2001:db8::; Prefix Length: /32; Expanded Network: 2001:0db8:0000:0000:0000:0000:0000:0000; First Address: 2001:db8::; Last Address: 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff; Total Addresses: 79,228,162,514,264,337,593,543,950,336; Number of /64s: 4,294,967,296 |
| Single host /128 | IPv6 address or prefix (CIDR): 2001:db8::1/128 | Network Address: 2001:db8::1; Prefix Length: /128; Expanded Network: 2001:0db8:0000:0000:0000:0000:0000:0001; First Address: 2001:db8::1; Last Address: 2001:db8::1; Total Addresses: 1; Number of /64s: 0 |
| Link-local /10 | IPv6 address or prefix (CIDR): fe80::1/10 | Network Address: fe80::; Prefix Length: /10; Expanded Network: fe80:0000:0000:0000:0000:0000:0000:0000; First Address: fe80::; Last Address: febf:ffff:ffff:ffff:ffff:ffff:ffff:ffff; Total Addresses: 332,306,998,946,228,968,225,951,765,070,086,144; Number of /64s: 18,014,398,509,481,984 |
FAQ
What is an IPv6 subnet mask?
IPv6 does not use dotted-decimal subnet masks like IPv4. Instead, it uses a prefix length written after a slash, such as /64. This number indicates how many of the 128 bits belong to the network portion.
Why is /64 the standard IPv6 subnet size?
Stateless Address Autoconfiguration (SLAAC) relies on a 64-bit interface identifier. A /64 prefix leaves exactly 64 bits for the host portion, which is required for SLAAC to function correctly.
How many /64 subnets are in a /48 allocation?
A /48 prefix has 16 bits available for subnetting beyond the /48 boundary. That yields 2^16, or 65,536 individual /64 subnets.
Can I use a /127 subnet in IPv6?
Yes. RFC 6164 recommends /127 for point-to-point inter-router links to mitigate neighbor discovery exhaustion attacks. However, never use /127 on a LAN where SLAAC is expected.
Does this ipv6 subnet mask calculator send my data to a server?
No. All parsing and BigInt math happen locally in your browser. Nothing is transmitted over the network.
What is the difference between compressed and expanded IPv6 notation?
Compressed notation removes leading zeros and replaces the longest run of zero groups with ::. Expanded notation writes all eight 16-bit groups with four hex digits each, padding with leading zeros.