๐ŸŒ IPv6 Subnet Calculator

Expanded form2001:0db8:0000:0000:0000:0000:0000:0001
Network address2001:db8::
Last address2001:db8::ffff:ffff:ffff:ffff
Total addresses18,446,744,073,709,551,616

Enter an IPv6 address and a prefix length (like /64) to calculate that subnet's network address, last address, and total number of addresses. Supports "::" zero-compression notation.

How to use

  1. Enter an IPv6 address ("::" zero-compression notation is supported).
  2. Enter a prefix length (0-128) โ€” the subnet details are calculated automatically.

How the calculation works

Given an IPv6 address and a prefix length (such as /64), this tool calculates the range of the network the address belongs to. An IPv6 address is 128 bits, written as eight 16-bit groups in hex separated by ":". One run of zero groups can be shortened to "::", and leading zeros in each group can be dropped. The tool also accepts addresses ending in an embedded IPv4 address, such as ::ffff:192.0.2.1. The network address keeps the first prefix-length bits and clears the rest; the last address sets the remaining bits to 1. The number of addresses is 2^(128 โˆ’ prefix length). Results use the RFC 5952 recommended form: lower case, with only the longest run of zero groups shortened to "::".

Worked example

2001:db8::1/64 Full form: 2001:0db8:0000:0000:0000:0000:0000:0001 Network: 2001:db8:: Last address: 2001:db8::ffff:ffff:ffff:ffff Addresses: 2โถโด = 18,446,744,073,709,551,616 2001:db8:abcd:12::1/48 Network: 2001:db8:abcd:: 2001:db8:0:0:1:0:0:1 is written 2001:db8::1:0:0:1 under RFC 5952 (when two zero runs are equally long, the first is shortened).

Things to be aware of

  • Home and office networks are usually given a /64. SLAAC (automatic address configuration) assumes a /64.
  • Unlike IPv4, IPv6 has no broadcast address, so every address in the range is usable (apart from a few reserved for routers).
  • 2001:db8::/32 is reserved for documentation and examples and is never used on real networks.

FAQ

What is a prefix length?

It's the number of bits, out of the 128 total in an IPv6 address, used for the network portion. For example, /64 means the first 64 bits are the network part and the remaining 64 bits are the host part.

Is there an IPv6 equivalent of an IPv4 broadcast address?

IPv6 has no broadcast address concept. The "last address" shown here is simply the address in the subnet where every host bit is set to 1 โ€” it's not a special reserved address.

What does "::" mean in an IPv6 address?

It's a notation that lets you replace one consecutive run of zero groups with "::" to shorten the address. It can only be used once per address.