An IPv6 subnet is identified by the pair of a 128-bit address and an integer prefix length from 0 to 128, so finding one means converting the address to a single integer, applying a bit mask of that prefix length, and reporting the resulting network value together with the first and last numeric addresses it covers. The two numbers that always appear in any IPv6 subnet answer are the network prefix — the input with all host bits cleared — and the numeric upper bound — the network value with every host bit set. The number of addresses in the subnet is exactly 2^(128−prefix), so a /64 contains 2⁶⁴ numeric values and a /128 contains exactly one. Doing this by hand is error-prone because every address has eight 16-bit hexadecimal fields and the count can exceed the precision of an IEEE-754 double; a local browser tool that uses BigInt arithmetic returns the exact value without rounding.

For a typical engineering task — confirming a range for a config file, documenting an allocation, or sanity-checking a colleague's prefix calculation — the operation is mechanical once you understand the inputs and the bit layout. This guide focuses on the exact task behind the search: turning a literal IPv6 address and a chosen prefix into the canonical network, the numeric bounds, and the exact address count.

how to find ipv6 subnet
How to Find an IPv6 Subnet Range From an Address

What 'Finding an IPv6 Subnet' Actually Returns

In IPv6, a "subnet" is not a separate dotted-decimal mask like in IPv4. It is the combination of an address and an integer prefix length. Per RFC 4291, the address has eight 16-bit hexadecimal fields totalling 128 bits, and the prefix length is a count of leading bits that identifies the network portion. The remaining bits, called host bits, identify individual addresses inside that prefix.

When the IPv6 Subnet Calculator processes an input, it returns six auditable facts: the canonical form of the input text, the network prefix (the input with host bits cleared), the number of host bits, the first numeric address in the range, the last numeric address in the range, and the exact count of addresses in the range. For the RFC 4291 example address 2001:0DB8:0:CD30:123:4567:89AB:CDEF with prefix 60, the network is 2001:db8:0:cd30::/60 and the last address is 2001:db8:0:cd3f:ffff:ffff:ffff:ffff. The tool follows the same algorithm each time: parse the text, build a 128-bit integer, clear the host bits for the network, set them for the upper bound, and compute the count.

Inputs the IPv6 Subnet Calculator Accepts

Two inputs, no more, are needed. The first is an IPv6 address in its conventional text form. RFC 4291 allows two styles:

  • Fully expanded: eight hexadecimal fields, each one to four hex digits, separated by single colons, for example 2001:0DB8:0000:CD30:0123:4567:89AB:CDEF.
  • Compressed: a single run of consecutive all-zero fields may be replaced by ::, producing for example 2001:DB8:0:CD30:123:4567:89AB:CDEF. Only one :: is allowed in the text.

The second input is the prefix length, an integer from 0 to 128 inclusive. Out-of-range values are rejected. The tool does not accept zone identifiers such as %eth0 or IPv4-embedded dotted-decimal forms such as ::ffff:192.0.2.1; both require additional interface or mixed-address context and are rejected rather than silently interpreted. Brackets, port numbers, and URL suffixes must be stripped before the address is pasted in.

How to Find an IPv6 Subnet Range Step by Step

The interaction with the IPv6 Subnet Calculator is intentionally short. The result is auditable so you can paste it into a runbook or commit message without further conversion.

  1. Paste the address in either fully expanded form (eight fields) or compressed form with one :: run. Strip any surrounding brackets, port suffix, or zone identifier before pasting.
  2. Enter the prefix length as an integer between 0 and 128. Use the prefix you actually want the subnet computed for — a /48, /56, /64, or anything else in range.
  3. Select Calculate subnet. The page runs the parse, expand, mask, and count operations locally in the browser.
  4. Compare the canonical input with the source you pasted. This is the RFC 5952 form — lowercase hex, leading zero suppression inside each field, and the longest run of two or more zero fields replaced by ::.
  5. Read the network prefix, the first numeric address, the last numeric address, and the exact address count. Copy whichever fields your documentation or configuration needs.
  6. Verify the result independently before applying it to a live system. For documentation and planning, the canonical text plus range is sufficient. For production changes, re-check the range in the network platform's supported tooling.

Reading the Output: Canonical, Network, First, Last, and Count

The output is laid out so each row can be cross-checked. The canonical input is what your pasted text looks like after the rules of RFC 5952 are applied: hexadecimal letters are lowercase, leading zero digits inside each 16-bit field are removed, and the longest run of two or more all-zero fields is compressed to ::. When two zero runs tie in length, the first one wins. A single zero field is never compressed, because the RFC recommends compressing only runs of two or more. Seeing this line lets you confirm the parser read your input correctly before trusting the numbers.

The network prefix is the canonical address with the host bits — every bit past the prefix length — set to zero. The first numeric address equals the network prefix. The last numeric address is the network prefix with every host bit set to one. The address count is exactly 2 raised to the number of host bits, displayed as a decimal integer computed with browser BigInt so even the largest prefixes do not lose precision.

The first and last labels are deliberately numeric. IPv6 does not define a broadcast address the way IPv4 does, so the upper bound is not labelled as broadcast and should not be treated as one. It is the top of the inclusive range that the prefix covers.

Prefix Lengths Compared: /0, /64, /128, and the Values in Between

Three prefix lengths cover the most-cited reference points and are worth knowing cold. The product contract names them explicitly, so the values in the table come from the tool's own defined behaviour rather than from a separately computed spreadsheet.

Prefix lengthHost bitsAddress countUse
/01282¹²⁸ (full 128-bit space)Default route catch-all; not used for an assignment
/64642⁶⁴ = 18,446,744,073,709,551,616Standard size for a single LAN segment and SLAAC
/12801A single host route, loopback, or anycast address

Other common lengths sit between these endpoints. /48 prefixes are widely used for site allocations, /56 for residential customer assignments in many providers' policies, and /127 for point-to-point links where only two addresses are needed. For any prefix p, the count is exactly 2^(128−p); if you need that figure for a length not in the table, run the IPv6 Subnet Calculator with the same address and the new prefix and read the count line directly.

Readers who want a worked walkthrough on the prefix-length side of the same calculation can follow how to find an IPv6 prefix length and range size for the companion angle.

What a Numeric Subnet Calculation Does Not Tell You

A prefix calculation tells you the numeric range that a given address and prefix length describe. It does not tell you anything about whether that prefix is actually in use, who owns it, or how traffic will flow toward it. RFC 5942 makes the conceptual split explicit: an address assignment and an on-link prefix are separate things. Routers, prefix information options in router advertisements, allocation policy, provider rules, firewall configuration, and an address-management plan all determine operational behaviour, and none of those are inputs to the calculator.

For the same reason, the page does not decide whether a prefix is globally assigned, reserved, multicast, anycast, or appropriate for SLAAC; it does not perform a WHOIS, DNS, BGP, or geolocation lookup; and it does not contact an interface on the device. That makes it suitable for documentation examples, for RFC 3849 documentation prefixes, and for private planning, but it cannot confirm ownership or reachability. Treat the result as a numeric containment check, not as a network configuration recommendation. If a production change depends on the output, independently verify it in the network platform's supported tooling and preserve the current configuration for rollback.

For the underlying addressing architecture referenced throughout this article, see RFC 4291; for the on-link versus assignment model discussed above, see RFC 5942.