Home ↓
CalculatorsVerified

Tech & Digital

IPv6 Subnet Calculator

Network prefix, first and last address, number of addresses and /64 subnets, expanded and compressed notation and address type for any IPv6 address and prefix length.

More options

How to use this calculator

  1. Type an IPv6 address in any valid form — compressed with “::”, fully expanded, or with an embedded IPv4 address.
  2. Enter the prefix length, for example 48 for a site or 64 for a LAN.
  3. Optionally enter a longer prefix under More options to see how many smaller subnets fit.
  4. Read the network prefix, the first and last address, the address count and the address type.

How IPv6 prefixes work

An IPv6 address is 128 bits long, written as eight groups of four hexadecimal digits separated by colons. The prefix length, written after a slash, says how many of the leading bits identify the network; the remaining bits identify interfaces within it. A /64 leaves 64 bits for hosts — about 18 quintillion addresses — and is the standard size for a single LAN, because stateless address autoconfiguration (SLAAC) expects a 64-bit interface identifier. Internet providers typically delegate a /48 or /56 to a site, which can then be split into 65,536 or 256 separate /64 networks.

The calculator applies the mask to find the network address, sets all host bits to one for the last address, and counts addresses and /64 subnets with exact big-integer arithmetic.

Compressed and expanded notation

RFC 5952 defines the canonical text form: leading zeros in each group are dropped, the longest run of two or more all-zero groups is replaced by “::”, and letters are lowercase. So 2001:0db8:0000:0000:0000:0000:0000:0001 becomes 2001:db8::1. The calculator shows both forms, which helps when comparing firewall rules, DNS records and router configurations written in different styles.

Address types

The first bits reveal the purpose of an address: 2000::/3 is global unicast, fc00::/7 unique local (similar to private IPv4 ranges), fe80::/10 link-local, ff00::/8 multicast, ::1 the loopback and ::ffff:0:0/96 IPv4-mapped addresses. 2001:db8::/32 is reserved for documentation and examples, which is why it appears in this page's default value.

Formula & method

Network = address AND maskAddresses in the prefix = 2^(128 − prefix)Subnets = 2^(new prefix − prefix)

Worked example

2001:db8:abcd:12::1 with a /64 prefix

  1. Mask = ffff:ffff:ffff:ffff:: (64 one bits)
  2. Network = 2001:db8:abcd:12::/64
  3. Last address = 2001:db8:abcd:12:ffff:ffff:ffff:ffff
  4. Addresses = 2^64 ≈ 1.845 × 10^19

Answer: A single /64 LAN in the documentation range.

Official sources

Last updated:

Frequently asked questions

Why is /64 the standard subnet size?

SLAAC address autoconfiguration (RFC 4862) and most IPv6 features expect a 64-bit interface identifier, so LANs use /64.

How many /64 subnets are in a /48?

2^16 = 65,536.

How many /64 subnets are in a /56?

2^8 = 256, a common allocation for home connections.

Can I use “::” twice in an address?

No. It may appear only once, otherwise the address would be ambiguous.

Is there an IPv6 equivalent of 192.168.x.x?

Unique local addresses in fd00::/8 play that role for private networks.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast instead, so every address in a prefix is usable.

Can I enter an IPv4-mapped address?

Yes, for example ::ffff:192.0.2.1; the embedded IPv4 part is converted to hex.