Code tool

IPv6 Subnet Calculator

Enter an IPv6 address with a prefix length from 0 to 128 to calculate its complete address range in your browser.

In-browser processingNo account requiredPrivacy details ↗

Accepts :: compression and a final IPv4 dotted decimal tail (four octets, 0–255, no leading zeroes).

All addresses are counted. /0 covers the entire 128-bit range; /128 contains exactly one address.

Formula: count = 2^(128 − prefix); network = (address >> host bits) << host bits; last = network + count − 1.

Sources: RFC 4291 · RFC 5952

A QUICK WALKTHROUGH

How to use this tool

  1. Enter an IPv6 address and CIDR prefix, such as 2001:db8::1/64.
  2. Calculate the subnet and review any input error.
  3. Read the normalized prefix, first and last address, and total address count.

Exact range calculation

Formula: count = 2^(128 − prefix); network = (address >> host bits) << host bits; last = network + count − 1.

Accepted notation

Accepts :: compression and a final IPv4 dotted decimal tail (four octets, 0–255, no leading zeroes). Zone identifiers (%) are not supported: they describe an interface scope, not the 128-bit address.

Local calculation and scope

Calculated locally. This range does not establish routing, allocation, or security.

GOOD TO KNOW

Common questions

What happens at /0 and /128?

All addresses are counted. /0 covers the entire 128-bit range; /128 contains exactly one address.