IPv6 Subnet Calculator
Inputs
| IPv6 address | 2001:db8:abcd:1234::1 |
|---|---|
| Prefix length | 64 |
IPv6 Subnet Calculator
Enter an IPv6 address and a prefix length to find the network address, the fully expanded and compressed (RFC 5952) forms, and how many addresses the prefix covers.
Inputs
Address and Prefix
Results
Enter a value to see results.
Subnet
Expanded Form
IPv6 Subnets
An IPv6 subnet calculator turns an IPv6 address and a prefix length into the full description of the network it belongs to: the network address, the address written in both its fully expanded and shortest compressed forms, and how many addresses the prefix covers. Anyone planning an IPv6 addressing scheme, configuring a router or firewall, or learning how the protocol differs from IPv4 reaches for this breakdown constantly.
How IPv6 addresses are written
An IPv6 address is 128 bits long — four times the size of an IPv4 address. Instead of four decimal octets, it is written as eight groups of four hexadecimal digits separated by colons, for example 2001:0db8:abcd:1234:0000:0000:0000:0001. Because addresses this long are tedious to read and type, two shortening rules apply. First, leading zeros inside any group may be dropped, so 0db8 becomes db8 and 0000 becomes 0. Second, a single run of consecutive all-zero groups may be replaced by a double colon ::. Applying both rules to the address above gives the compressed form 2001:db8:abcd:1234::1.
The canonical shortest form is standardized by RFC 5952: leading zeros are always removed, the :: replaces the longest run of zero groups, and when two runs tie the leftmost one wins. The :: may appear only once, because more than one would be ambiguous. The expanded and compressed forms always name the same address — the choice is purely about readability.
Prefix length and the network address
IPv6 uses CIDR notation just like IPv4: an address followed by a slash and a prefix length, such as 2001:db8::/32. The prefix is the number of leading bits reserved for the network portion; the remaining 128 − n bits identify hosts within the subnet. The network address is found by keeping the network bits and setting every host bit to zero, then writing the result in compressed form.
The number of addresses in a block follows directly from the host-bit count:
There is no "subtract two" rule here. IPv6 does not reserve a separate network or broadcast address the way IPv4 does, so the entire block is conceptually addressable.
Common prefix sizes
A handful of prefix boundaries dominate real deployments:
- /64 — the standard single subnet. Its 64 host bits are sized for stateless address autoconfiguration (SLAAC), and almost every ordinary IPv6 link is a /64. A single /64 holds 2 to the power of 64 addresses.
- /56 — a typical allocation to a home or small office. It contains 256 separate /64 subnets.
- /48 — a common allocation to a larger organization or site, holding 65,536 /64 subnets.
Each step of 8 prefix bits multiplies the number of /64 subnets by 256. The address counts grow just as fast: a /64 covers about 18.4 quintillion addresses, a /48 about 1.2 septillion.
Worked example
Take 2001:db8:abcd:1234::1 with a /64 prefix. The mask devotes 64 bits to the network, leaving 64 host bits:
The host portion (the final 64 bits, here ::1) is cleared to produce the network address 2001:db8:abcd:1234::, while the compressed form of the original address stays 2001:db8:abcd:1234::1. Shorten the prefix to /48 and the network becomes 2001:db8:abcd::, a block of 2 to the power of 80 — about 1.2 septillion — addresses.
Related calculators
For IPv4 networks, the Subnet (CIDR) Calculator performs the same breakdown with network, broadcast, and usable host counts. To count the addresses in an arbitrary IPv4 span or summarize it into a block, see the IP Address Range Calculator.
Frequently Asked Questions (FAQ)
Why does IPv6 look so different from IPv4?
IPv6 addresses are 128 bits long instead of 32, which is why they are written as eight groups of four hexadecimal digits separated by colons rather than four decimal octets. The larger space removes the address scarcity that forced IPv4 networks to rely on NAT, and it lets every subnet be a uniform /64. The colon-hexadecimal notation, with its zero-compression rules, keeps these long addresses readable.
What is the difference between the expanded and compressed forms?
The expanded form writes all eight groups with their leading zeros, such as 2001:0db8:abcd:1234:0000:0000:0000:0001 — useful when you need every digit lined up. The compressed form follows RFC 5952: it drops leading zeros within each group and replaces the single longest run of all-zero groups with ::, giving 2001:db8:abcd:1234::1. Both name the same address; the compressed form is the one you normally type and store.
What do the /48, /56, and /64 prefixes mean?
These are the common allocation boundaries. A /64 is the standard single subnet — its host bits are sized for stateless address autoconfiguration. A /56 gives a site 256 of those /64 subnets, a typical home or small-office allocation. A /48 gives 65,536 /64 subnets and is a common allocation to a larger organization. Each step of 8 bits multiplies the number of subnets by 256.
How many addresses does a prefix cover?
A /n prefix leaves 128 − n host bits, so the block holds 2 to the power of (128 − n) addresses. A /64 therefore covers 2 to the power of 64, which is 18,446,744,073,709,551,616 — about 18.4 quintillion addresses in a single subnet. A /48 covers 2 to the power of 80, roughly 1.2 septillion. Unlike IPv4, IPv6 does not reserve a network or broadcast address, so the whole block is conceptually addressable.