IPv6 Subnet Calculator and Prefix Planner (/48, /56, /64)
Expand and compress IPv6 addresses per RFC 5952, calculate network prefix boundaries, /64 SLAAC subnet counts, and child prefix blocks.
Input Parameters
Calculation Results
- inputAddress
- 2001:db8:abcd:12::1
- prefix
- 48
- compressed
- 2001:db8:abcd:12::1
- expanded
- 2001:0db8:abcd:0012:0000:0000:0000:0001
- networkCidr
- 2001:db8:abcd::/48
- networkCompressed
- 2001:db8:abcd::
- networkExpanded
- 2001:0db8:abcd:0000:0000:0000:0000:0000
- firstAddress
- 2001:db8:abcd::
- lastAddress
- 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
- lastExpanded
- 2001:0db8:abcd:ffff:ffff:ffff:ffff:ffff
- prefixMaskCompressed
- ffff:ffff:ffff::
- prefixMaskExpanded
- ffff:ffff:ffff:0000:0000:0000:0000:0000
- hostBits
- 80
- totalAddressesFormatted
- 1.208.925.819.614.629.174.706.176
- totalAddressesPower
- 2^80
- subnets64Count
- 65.536
- subnets64Power
- 2^16
- addressType
- Documentation (2001:db8::/32)
- reverseDnsArpa
- d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa
- childPrefix
- 64
- childSubnetCountFormatted
- 65.536
- childSubnetCountPower
- 2^16
| # | Child Prefix | First Address | Last Address | /64 Subnets |
|---|---|---|---|---|
| 1 | 2001:db8:abcd::/64 | 2001:db8:abcd:: | 2001:db8:abcd:0:ffff:ffff:ffff:ffff | 1 |
| 2 | 2001:db8:abcd:1::/64 | 2001:db8:abcd:1:: | 2001:db8:abcd:1:ffff:ffff:ffff:ffff | 1 |
| 3 | 2001:db8:abcd:2::/64 | 2001:db8:abcd:2:: | 2001:db8:abcd:2:ffff:ffff:ffff:ffff | 1 |
| 4 | 2001:db8:abcd:3::/64 | 2001:db8:abcd:3:: | 2001:db8:abcd:3:ffff:ffff:ffff:ffff | 1 |
| 5 | 2001:db8:abcd:4::/64 | 2001:db8:abcd:4:: | 2001:db8:abcd:4:ffff:ffff:ffff:ffff | 1 |
| 6 | 2001:db8:abcd:5::/64 | 2001:db8:abcd:5:: | 2001:db8:abcd:5:ffff:ffff:ffff:ffff | 1 |
| 7 | 2001:db8:abcd:6::/64 | 2001:db8:abcd:6:: | 2001:db8:abcd:6:ffff:ffff:ffff:ffff | 1 |
| 8 | 2001:db8:abcd:7::/64 | 2001:db8:abcd:7:: | 2001:db8:abcd:7:ffff:ffff:ffff:ffff | 1 |
How to Use This Tool
- Enter an IPv6 address (for example 2001:db8:abcd:12::1) or a full CIDR notation (for example 2001:db8:abcd::/48) into the address input.
- Select the parent prefix length (such as /32 for ISP allocations, /48 for enterprise sites, /56 for branch offices, or /64 for a single LAN).
- Choose a target child prefix length (such as /64 or /56) to compute the number of child subnets and inspect the first 8 boundary-aligned blocks.
Worked Example: Enterprise Site /48 → /64 (2001:db8:abcd::/48)
Computed example: Site allocation 2001:db8:abcd::/48 (expanded: 2001:0db8:abcd:0000:0000:0000:0000:0000) spans 2001:db8:abcd:: through 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff (2^80 = 1.208.925.819.614.629.174.706.176 addresses) and yields 65.536 standard /64 SLAAC subnets (Documentation (2001:db8::/32)).
{
"address": "2001:db8:abcd::1",
"prefix": 48,
"childPrefix": "64"
}- inputAddress:
- 2001:db8:abcd::1
- prefix:
- 48
- compressed:
- 2001:db8:abcd::1
- expanded:
- 2001:0db8:abcd:0000:0000:0000:0000:0001
- networkCidr:
- 2001:db8:abcd::/48
- networkCompressed:
- 2001:db8:abcd::
- networkExpanded:
- 2001:0db8:abcd:0000:0000:0000:0000:0000
- firstAddress:
- 2001:db8:abcd::
- lastAddress:
- 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff
- lastExpanded:
- 2001:0db8:abcd:ffff:ffff:ffff:ffff:ffff
- prefixMaskCompressed:
- ffff:ffff:ffff::
- prefixMaskExpanded:
- ffff:ffff:ffff:0000:0000:0000:0000:0000
- hostBits:
- 80
- totalAddressesFormatted:
- 1.208.925.819.614.629.174.706.176
- totalAddressesPower:
- 2^80
- subnets64Count:
- 65.536
- subnets64Power:
- 2^16
- addressType:
- Documentation (2001:db8::/32)
- reverseDnsArpa:
- d.c.b.a.8.b.d.0.1.0.0.2.ip6.arpa
- childPrefix:
- 64
- childSubnetCountFormatted:
- 65.536
- childSubnetCountPower:
- 2^16
Core Concept & Engineering Notes
How It Was Calculated (Formulas & Steps)
Mathematical Formulas
- Host Bits = 128 − Prefix
- Prefix Mask = (2^128 − 1) XOR (2^(128 − Prefix) − 1)
- Network Address = IPv6 BigInt AND Prefix Mask
- Last Address = Network Address OR (NOT Prefix Mask)
- Number of /64 Subnets = 2^(64 − Prefix) for Prefix ≤ 64
- Child Subnet Count (/Pc) = 2^(Pc − Prefix) for Pc ≥ Prefix
Step-by-Step Calculation
- Expand IPv6 address 2001:db8:abcd:12::1 to 8×16-bit hextets: 2001:0db8:abcd:0012:0000:0000:0000:0001 (compressed RFC 5952: 2001:db8:abcd:12::1)
- Apply /48 prefix mask (ffff:ffff:ffff::): network = 2001:db8:abcd::/48, host bits = 128 - 48 = 80
- Address range: 2001:db8:abcd:: to 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff (2^80 = 1.208.925.819.614.629.174.706.176 total addresses)
- Standard /64 SLAAC subnets inside /48: 65.536; child /64 split produces 65.536 (2^16) subnets
Frequently Asked Questions (FAQ)
Why should every end-user IPv6 LAN use a /64 prefix?
IETF standards (RFC 4291 and RFC 4862) split a 128-bit IPv6 address into a 64-bit network prefix and a 64-bit Interface Identifier (IID). Stateless Address Autoconfiguration (SLAAC) requires a 64-bit IID; prefixes longer than /64 break SLAAC on operating systems that do not support DHCPv6.
How many /64 subnets are inside a /48 or /56 prefix?
A /48 prefix provides 2^(64-48) = 2^16 = 65,536 individual /64 subnets. A /56 prefix provides 2^(64-56) = 2^8 = 256 individual /64 subnets.
What is the difference between GUA, ULA, and Link-Local IPv6 addresses?
Global Unicast Addresses (GUA, 2000::/3) are publicly routable on the global internet. Unique Local Addresses (ULA, fc00::/7, typically fd00::/8) are private addresses for internal networks similar to RFC 1918 in IPv4. Link-Local addresses (fe80::/10) are valid only on a single L2 link and are mandatory for Neighbor Discovery.
What prefix length should be used for router-to-router point-to-point links?
RFC 6164 recommends using a /127 prefix on point-to-point router links to prevent Neighbor Discovery exhaustion attacks, while reserving a full /64 out of your address plan so no other interface shares that /64 boundary.
Related Calculators
Calculate IPv4 network address, broadcast, usable host range, netmask, wildcard, binary mask, and RFC address type (RFC 1918, /31, CGNAT).
Split an IPv4 network into N equal subnets or allocate boundary-aligned VLSM blocks by required host count with CSV and Markdown export.
Calculate Limit-At (CIR), Max-Limit (MIR), Burst, PCQ, and FQ-CoDel for RouterOS v7 with automated configuration script generation.
References & Notes
- RFC 4291 — IP Version 6 Addressing Architecture
- RFC 5952 — A Recommendation for IPv6 Address Text Representation
- RFC 4193 — Unique Local IPv6 Unicast Addresses (ULA)
- RFC 3849 — IPv6 Address Prefix Reserved for Documentation (2001:db8::/32)
Note: Results above are mathematical estimates based on standard formulas. Always verify against official vendor documentation and site conditions before production deployment.