Skip to content
runonprem

Networking

IPv6 subnet calculator

Work out your IPv6 prefix: the network, first and last address, how many /64 networks it holds, and how to split the /56 or /48 from your ISP into one /64 per LAN or VLAN. Addresses are shown both compressed (RFC 5952) and fully expanded.

/prefix
Network
2001:db8:abcd::/56
Expanded
2001:0db8:abcd:0000:0000:0000:0000:0000
First address
2001:db8:abcd::
Last address
2001:db8:abcd:ff:ffff:ffff:ffff:ffff
Addresses
2^72
/64 networks
256
Address type
Documentation (2001:db8::/32)
Your address (compressed)
2001:db8:abcd:12::1

256 × /64 (first 16)

  • 2001:db8:abcd::/64
  • 2001:db8:abcd:1::/64
  • 2001:db8:abcd:2::/64
  • 2001:db8:abcd:3::/64
  • 2001:db8:abcd:4::/64
  • 2001:db8:abcd:5::/64
  • 2001:db8:abcd:6::/64
  • 2001:db8:abcd:7::/64
  • 2001:db8:abcd:8::/64
  • 2001:db8:abcd:9::/64
  • 2001:db8:abcd:a::/64
  • 2001:db8:abcd:b::/64
  • 2001:db8:abcd:c::/64
  • 2001:db8:abcd:d::/64
  • 2001:db8:abcd:e::/64
  • 2001:db8:abcd:f::/64

How to use it

  1. Enter an address with its prefix length, e.g. the delegated prefix shown in your router (2001:db8:abcd:1200::/56).
  2. Read the network, address range and number of /64 networks.
  3. Choose the size to split into — /64 for every LAN, VLAN or Wi-Fi network — and copy the subnets you need.

Formula and method

network     = address AND mask        (mask = prefix ones, then zeros)
last        = network OR NOT mask
addresses   = 2^(128 − prefix)
/64 count   = 2^(64 − prefix)
split /p→/n = 2^(n − p) subnets, each 2^(128 − n) addresses apart

Worked example

In 2001:db8:abcd:12::1/56 the first 56 bits are 2001:0db8:abcd and the first byte (00) of the fourth group 0012, so the network is 2001:db8:abcd::/56 and the last address is 2001:db8:abcd:ff:ffff:ffff:ffff:ffff. A /56 holds 2⁶⁴⁻⁵⁶ = 256 networks of /64: 2001:db8:abcd::/64, 2001:db8:abcd:1::/64, 2001:db8:abcd:2::/64 … up to 2001:db8:abcd:ff::/64.

FAQ

How big is the prefix my ISP gives me?

Commonly a /56 (256 networks of /64) or a /48 (65,536) for home and business lines; some ISPs only hand out a single /64. Your router shows it as the delegated prefix (DHCPv6-PD).

Why should every LAN be a /64?

Stateless address autoconfiguration (SLAAC) builds addresses from a 64-bit interface identifier, so it only works on /64 networks.

How is an IPv6 address shortened?

RFC 5952: lower-case hexadecimal, leading zeros in each group dropped, and the longest run of two or more all-zero groups replaced by "::" (only once, the first run if two are equally long).

Related tools

Formulas reviewed November 27, 2026 by Novian · runs entirely in your browser · methodology