IPv6 CIDR Calculator

Enter an IPv6 address with a prefix length to get the network, the first and last address, and the exact number of addresses. The IPv6 subnet calculator also shows the full and compressed forms and the address type.

Updated
Calculated in your browser. No address is looked up online.

Compressed or full form. Add the prefix here (/64) or in the next field.

0 to 128.

Network (CIDR)
–
Total addresses
–
First address
–
Last address
–
/64 subnets inside
–
Address type
–
Address, compressed
–
Address, full form
–
Network, full form
–
Last address, full form
–

How to use the IPv6 CIDR Calculator

  1. Type the address into IPv6 address or network, in compressed (2001:db8::1) or full form.
  2. Add the prefix, either after a slash in the same field (2001:db8::/48) or in Prefix length.
  3. Read the network, the first and last address, and the total. Copy any value with the button beside it.

How it works

An IPv6 address has 128 bits. With a prefix length p:

  • Network (first address) = address AND a mask of p one-bits.
  • Last address = network OR the 128 − p host bits all set to one.
  • Total addresses = 2^(128 − p), counted exactly with big-integer math, so even a /0 prints every digit.
  • /64 subnets = 2^(64 − p) for prefixes of /64 or shorter.

IPv6 has no broadcast address, so the whole block is usable. The compressed form follows RFC 5952: lowercase, leading zeros dropped, and the longest run of zero groups written as ::.

Examples

  • 2001:db8::/64 = 18,446,744,073,709,551,616 addresses, from 2001:db8:: to 2001:db8::ffff:ffff:ffff:ffff. Type: documentation.
  • 2001:db8:abcd::/48, a common site allocation, holds 65,536 /64 subnets.
  • fd12:3456:789a:1::/64 is a unique local address (ULA), the IPv6 counterpart of private IPv4 space.
  • 2001:db8::1/127 is a point-to-point link with 2 addresses (RFC 6164).

Common IPv6 prefix sizes

PrefixTypical use/64 subnets inside
/32Allocation to an ISP or large network4,294,967,296
/48One site or organization65,536
/56Home or small business from an ISP256
/64One LAN segment (needed for SLAAC)1
/127Router-to-router linkNone
/128A single address, such as a loopbackNone

Limitations

  • Zone indexes such as %eth0 are rejected. They name a local interface and are not part of the address.
  • The calculator shows the block an address belongs to. It does not check whether that block is assigned or routed on the internet.
  • For IPv4 networks, use the IPv4 Subnet Calculator.

Frequently asked questions

How many addresses are in a /64?

18,446,744,073,709,551,616, which is 2 to the power of 64. That is the standard size of one IPv6 LAN.

Why do IPv6 LANs use /64?

SLAAC, the way most devices configure their own IPv6 address, builds a 64-bit interface ID. It only works when the network prefix is exactly 64 bits long.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast instead, so every address in a block, including the first and the last, can be assigned.

How many /64 subnets are in a /48?

65,536. The 16 bits between /48 and /64 give 2 to the power of 16 subnet IDs.

Often used together with the IPv6 CIDR Calculator.