IPv6 CIDR Calculator

Enter an IPv6 address and prefix length to calculate its network, first and last addresses, and total address count. The result also includes the normalized address for checking an IPv6 CIDR range.

Runs locally in your browser
This tool processes all data locally in your browser.
IPv6 address or CIDREnter a valid IPv6 address, optionally with a prefix such as 2001:db8::1/64. The range is calculated with browser BigInt.

How to read an IPv6 network from one address

One address, with or without a prefix, describes a whole IPv6 block. The page normalizes the address, works out the network it belongs to with its first and last address, and gives the size of the block as host bits and as an exact number of addresses. The arithmetic runs on BigInt in the browser, so /0 and /128 come out exact.

The tool reads text only. It does not query DNS, ping the host or contact any service, and it keeps working with the network disconnected. The result therefore describes the block the text selects; it says nothing about whether an address is assigned, reachable or routed.

  1. Paste an IPv6 address into the field, for example 2001:db8::42 or 2001:db8::42/64. Load example fills in a sample; without a prefix the address counts as a single host with /128.
  2. Press Analyze locally, or Ctrl / Cmd + Enter. Input that is not a valid address is refused with a message naming the part that failed: a group, the prefix, an embedded IPv4 part or a stray colon.
  3. Read the report: normalized is the canonical spelling of the typed address, network/prefix names the block, first and last are its bounds, and hostBits with addresses gives the size, for example 2^64 = 18446744073709551616 for a /64.
  4. Read the notes under the report for the cases that surprise people: an address that sits inside the block instead of at its start, the unspecified address ::, loopback, link-local fe80::/10, unique local fc00::/7, multicast, IPv4-mapped addresses, and prefixes shorter than /32.
  5. Copy takes the JSON report to the clipboard; Clear empties both panels and puts the cursor back in the input.

Address syntax, prefix arithmetic and what this page cannot check

What the prefix selects

The prefix counts the leading bits that identify the network; the remaining 128 minus prefix bits identify an interface inside it. A /64 keeps 64 bits, so the block runs up to ffff:ffff:ffff:ffff and holds 2^64 addresses, while /127 holds two addresses and /128 exactly one.

IPv6 defines no broadcast address and no unusable network address, so every address in a block can be assigned. Writing the network address with a zero interface identifier is a routing convention, not a rule of the protocol, which is why this page reports bounds and counts instead of subtracting hosts.

Accepted spellings and the canonical form

RFC 4291 accepts up to four hexadecimal digits per group, one :: standing for one or more groups of zeros, and a dotted quad in the last 32 bits, so ::ffff:192.0.2.1 and ::ffff:c000:201 are the same address. Letter case and leading zeros are free: 2001:0DB8:0000::1 equals 2001:db8::1.

The normalized field prints one accepted spelling following RFC 5952: lowercase, no leading zeros, the longest run of zero groups written as ::, the leftmost run winning a tie, and a single zero group left in full. IPv4-mapped addresses appear in the mixed form the same RFC recommends for the ::ffff:0:0/96 prefix, for example ::ffff:192.0.2.1.

What this page cannot check

The page works on text, so it cannot say whether an address is allocated to you, whether the host answers, or whether a router carries the prefix. fe80::/10, fc00::/7, ff00::/8 and 2001:db8::/32 are recognised by their roles, but ownership comes from the registry and reachability from the network.

Group syntax, the prefix range 0-128 and embedded IPv4 octets are checked strictly, so a value accepted here is read the same way by any conforming implementation. A refused value names the reason and the part that failed, which is what makes the message useful when the text came from a configuration file or a log.

Recent tools: