IPv6 Calculator
Expand, compress and analyze IPv6 addresses including prefix and interface identifier breakdown.
About IPv6 Calculator
IPv6 addresses are 128 bits written as eight groups of four hex digits. The '::' shorthand collapses consecutive all-zero groups. Expanding reverses this compression for analysis. The prefix length determines how many leading bits identify the network versus the interface.
Formula
Addresses in subnet
addresses = 2^(128 - prefix)
- p
- Prefix length in bits
Worked example
With the default values below, IPv6 Calculator returns Expanded Address of 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Change any input above and every figure here is recalculated in your browser.
Inputs used
- IPv6 Address
- 2001:0db8:85a3::8a2e:0370:7334
- Prefix Lengthaccepts 0–128
- 64
Results
- Expanded Address
- 2001:0db8:85a3:0000:0000:8a2e:0370:7334
- Compressed Address
- 2001:db8:85a3::8a2e:370:7334
- Prefix Length
- /64
- Addresses in Subnet
- 2^64 = ~1.84e+19
- Host Bits
- 64
Step by step
- 1Expand address= 2001:0db8:85a3:0000:0000:8a2e:0370:7334
- 2Identify prefix= /64
- 3Host bits= 64
- 4Address space= 2^64 = ~1.84e+19
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
Why is /64 the most common IPv6 prefix?
IPv6 was designed with a 64-bit network prefix and 64-bit interface identifier split in mind. SLAAC (Stateless Address Autoconfiguration) requires a /64 subnet to derive interface IDs from MAC addresses, making /64 the standard subnet size for end-user networks.
How does '::' compression work?
A single '::' replaces one or more consecutive groups of all zeros. It can only appear once in an address to avoid ambiguity about how many groups were compressed.
