IPv6 Subnet Calculator

Enter an IPv6 address with a prefix length (CIDR notation) to get the network, the first and last addresses and the total number of addresses. The address is also rewritten in its standard (RFC 5952) form.

The address can use upper or lower case and can have leading zeros in a group. The prefix length is from 0 to 128. The example addresses are in 2001:db8::/32, which is reserved for documentation.
Network (prefix) —
Results
Normalized address (RFC 5952)—
Expanded form (eight groups of four digits)—
Network (prefix)—
First address—
Last address—
Total number of addresses—
Number of /64 subnets—

The value copied is the network (prefix), for example 2001:db8::/64.

How it is calculated

An IPv6 address has 128 bits. A prefix length n means that the leftmost n bits identify the network.

The calculation uses 128-bit whole numbers (BigInt), so there is no rounding error. Every prefix length from 0 (all addresses) to 128 (a single address) works. IPv6 has no broadcast address, so, unlike the IPv4 Subnet Calculator, this tool does not show a broadcast address or a count of usable hosts (total − 2). The range is given by its first and last addresses.

How an address is written (RFC 4291)

An IPv6 address can be written in these ways (RFC 4291, section 2.2):

A prefix is written address/prefix-length (RFC 4291, section 2.3). The address on the left may have bits set in the host part; this tool shows the network address with the host part cleared.

Normalization (RFC 5952)

Because one address can be written in many ways, RFC 5952 defines one canonical form. The "Normalized address" in this tool follows its rules:

For an IPv4-mapped address (in the range ::ffff:0:0/96), RFC 5952 (section 5) recommends the mixed notation with the IPv4 part in decimal (::ffff:192.0.2.1). This tool shows that mixed notation only for addresses in the IPv4-mapped range, for reference.

Examples

The first address of a subnet

The first address of a subnet (with an interface ID of all zeros) is reserved as the Subnet-Router anycast address (RFC 4291, section 2.6.1). Every router must support it on the subnets it is attached to.

Notes

Sources and checking

The notation, normalization and reserved-address statements above were checked against the full text of these RFCs on 2026-11-01:

Frequently asked questions

Which address is the IPv6 broadcast address?

IPv6 has no broadcast address. What broadcast does in IPv4 is done with multicast in IPv6. This tool shows the first and last addresses of the range.

What does "::" mean?

One or more groups of 16 bits of zeros. It can be used only once in an address. In the canonical form (RFC 5952) it replaces the longest run of zero groups (the first one if two are equally long), and it is not used for a single zero group.

How many addresses are in a /64?

2^64, which is 18,446,744,073,709,551,616.

Why can the same address be written in different ways?

Leading zeros can be left out or kept, "::" can go in different places, and letters can be upper or lower case. Rewriting an address in the RFC 5952 canonical form gives the same text for the same address.