IPv6 Calculator
Find the prefix, range, subnets and type of any IPv6 address, and watch each hex digit turn into four lights on the ground.
- Addresses
- /64 networks
- Type
network interface Tap a row of the result and the ground lights up that address; tap a light to flip that bit of the IP.
See the math step by step1 / 8
An IPv6 address is 128 lights
The address has 128 bits, four times the 32 of IPv4. On the ground they are eight rows of 16 lights, one row for each group of the address. Lit means 1, dark means 0.
Four times the bits does not mean four times the addresses: every extra bit doubles the count. That is 2 to the power of 128, about 340 undecillion.
2 / 8
Each hex digit is 4 lights
With so many bits, IPv6 is written in hexadecimal: 0 to 9 and then a to f, worth 10 to 15. One digit holds exactly 4 bits, so the weights painted on the ground are just 8, 4, 2 and 1, repeated in every block of four lights. Add up the lit ones and you get the digit: 8 + 4 + 1 = 13, which is d.
3 / 8
Leading zeros go away, and :: swallows zero groups
Writing all 32 digits gets tiring, so there are two rules to shorten it. In each group, the leading zeros can go: 0db8 becomes db8, and 0000 becomes 0.
And the longest run of all zero groups becomes ::, only once per address, otherwise there would be no way to tell how many groups each one hides. So the address becomes .
This address has no two zero groups in a row, so there is no place for the ::, and it stays .
4 / 8
The prefix splits network from interface
means the first bits belong to the network, and the other identify the interface, the device inside it. The wire marks the border.
In IPv6 almost nobody writes the full mask, : the prefix is enough. When the border falls in the middle of a block, that digit is split between the network and the interface.
5 / 8
Network address: turn the interface off
Keep the network bits as they are in the IP and turn off every interface bit. It is the same AND operation as in IPv4, and the result is the network prefix: .
With the interface all zeros, this address is the anycast of the routers on that network (RFC 4291), so devices take the ones after it.
With /127 both addresses serve a link between two routers (RFC 6164). With /128 the block is a single address: .
6 / 8
There is no broadcast
Turn on every interface bit and you reach the last address, . In IPv4 it would be the broadcast, but IPv6 has no broadcast: to reach every device on the local network there is the multicast address ff02::1.
From the network to the last one there are 2 to the power of addresses: .
7 / 8
A network is almost always /64
The thick line painted across the middle of the ground is the /64. On a local network, the 64 bits on the right belong to the interface, and each device builds its own address from them (SLAAC).
Your provider hands out a bigger block, like a /48 or a /56, and the bits between the end of the prefix and the /64, in blue, number your networks. With that is bits: /64 networks.
With there are no bits left before the /64 to number other networks. Providers usually hand out a /48 or a /56.
8 / 8
The first bits tell the type
Some fixed prefixes say what an address is for. This one falls in . .
The ones you see the most: 2000::/3 is the global internet address, fe80::/10 is the link local address every device creates on its own, fd00::/8 is the private network (ULA), ff00::/8 is multicast and 2001:db8::/32 is reserved for documentation, like the examples on this page.