What you get from an address and a prefix

IPv6 addresses are usually written with a prefix length, as in 2001:db8:1:2::1234/64. The address names one interface, while the prefix says how many leading bits identify the network. This page separates the two. It returns the network address, which is the first address of the block, and the exact number of addresses the block contains. The default input 2001:db8:1:2::1234 with a prefix of 64 returns the network 2001:db8:1:2:: and a count of 18,446,744,073,709,551,616. Use it to confirm a prefix before you write it into a router, a firewall rule, a DNS zone name or an allocation record. Because the output is canonical, it is also a convenient way to normalize prefixes pasted from different tools before you compare them.

The bit arithmetic

The calculator treats the address as one 128-bit integer. It shifts the value right by 128 minus the prefix and then left by the same amount, which clears every host bit and keeps the network bits. The block size is 2^(128 − prefix). Because the counts are huge, the page uses exact big-integer arithmetic. A floating-point number would round a value such as 2^80 and show the wrong trailing digits, while the exact result is 1,208,925,819,614,629,174,706,176. Every prefix is a whole number of bits from 0 to 128, so each answer is a power of two, and each extra prefix bit halves the block.

Reading the canonical output

The network address appears in the compressed text form recommended by RFC 5952. Letters are lowercase, leading zeros in each group are dropped, and the longest run of all-zero groups becomes a double colon. A run of just one zero group is left as 0, not compressed. For example, 2001:0db8:00ab:0000:0000:0000:0000:0000 is written 2001:db8:ab::. The rule gives each address one preferred spelling, which makes text comparison, searching logs and diffing configuration files reliable. The input may use any valid spelling, including uppercase letters or an existing double colon, but the zone identifier that some systems append after a percent sign, as in fe80::1%eth0, is not accepted.

The 64-bit default and common prefix sizes

A /64 is the standard size of a single IPv6 subnet. RFC 4291 defines interface identifiers as 64 bits for most unicast addresses, and stateless address autoconfiguration depends on that split. A /64 holds 2^64 addresses, about 18.4 quintillion, which is the square of the whole IPv4 address space. Sites commonly receive a /48, which contains 65,536 subnets of /64, or a /56, which contains 256. Entering 2001:db8:abcd:12::5 with a prefix of 48 returns the network 2001:db8:abcd:: and 1,208,925,819,614,629,174,706,176 addresses. Entering 2001:db8:ff:aa::1 with a prefix of 56 returns 2001:db8:ff:: and 4,722,366,482,869,645,213,696 addresses.

Prefixes for links and host routes

Not every prefix is a /64. Point-to-point links between routers sometimes use a /127, which holds two addresses and is described in RFC 6164 as a way to avoid certain neighbor discovery problems on such links. A /128 identifies a single address and appears as a host route or a loopback. Entering 2001:db8::1 with a prefix of 127 returns the network 2001:db8:: and a count of 2, and the same address with a prefix of 128 returns the address itself and a count of 1. At the other end of the range, a /32 holds 2^96 addresses, a size that a regional registry commonly allocates to an internet service provider.

No broadcast and no host subtraction

IPv4 subnets conventionally give up two addresses, the network and the broadcast. IPv6 has no broadcast address, because RFC 4291 replaced it with multicast groups, so the count on this page is the full size of the block and nothing is subtracted. That count is also a measure of address space, not a promise that every address is assignable to a host. Some addresses are used by routers as anycast addresses, the subnet-router anycast address is the one with all host bits zero, and operators often reserve ranges for infrastructure. The page reports the arithmetic and leaves assignment policy to you. Neighbor discovery uses solicited-node multicast addresses where IPv4 uses ARP broadcasts, so the missing broadcast address removes no function from the network.

Documentation prefixes and special ranges

The prefix 2001:db8::/32 is reserved for documentation and examples by RFC 3849, so it is safe in tutorials, diagrams and tests, and the defaults on this page use it. Other ranges behave differently. Link-local addresses begin with fe80::/10 and never leave the local link. Unique local addresses, defined in RFC 4193, fall within fc00::/7 and play a role similar to the private ranges of IPv4. This page does not classify an address by scope or check whether it is globally routable. It performs the same masking arithmetic for any valid input, so use the allocation records from your registry or provider to learn what a given block is for.

Planning a hierarchy from one allocation

Prefix arithmetic helps when you divide an allocation. A /48 split into /64 subnets gives 2^(64−48) = 65,536 subnets, enough to number every VLAN of a large campus and still leave room. A /56 gives 256, enough for most homes and small offices. When you divide, keep boundaries on nibble limits, multiples of four bits, so that each hexadecimal digit of the address belongs to one level of the hierarchy. A /52 then ends after the third hexadecimal digit of the fourth group, which makes the plan easy to read and to write in reverse DNS zones, where each digit is one label. As a quick check of the arithmetic, a /52 inside a /48 gives 2^4 = 16 subnets of that size, and a /60 inside a /56 gives 16 as well.

Limits of this page

The calculator needs a valid IPv6 address without a zone identifier and a prefix from 0 to 128. It reports the network boundary and the size of the block. It does not list the individual addresses, show the last address, check overlap with your existing allocations, or confirm that a prefix is delegated to you. IPv4-mapped notation is not a subnetting tool here. For allocation policy and the recommended prefix sizes for sites, consult your regional internet registry and RFC 6177, which discusses why a fixed prefix size is no longer mandated for every site. Always verify planned prefixes against your provider documentation before deployment.