Logo

MonoCalc

/

IPv6 Prefix Calculator

Networking

Quick examples:

Enter an IPv6 address above to analyze the prefix block.

About This Tool

🌐 IPv6 Prefix Calculator – CIDR Subnetting for IPv6 Networks

The IPv6 Prefix Calculator is a network engineering tool that decomposes any IPv6 CIDR prefix into its full set of properties: network address, first and last usable host, total address count, address type classification, and boundary alignment status. Whether you are planning an ISP allocation, segmenting a datacenter, or studying IPv6 fundamentals, this calculator handles the full 128-bit address space with precise BigInt arithmetic.

What Is an IPv6 Prefix?

An IPv6 prefix is a block of consecutive IP addresses defined by a network address and a CIDR prefix length (written as /N where N is 0–128). The prefix length specifies how many of the leftmost bits are the "network" portion; the remaining bits identify individual hosts within the block.

For example, 2001:db8:abcd::/48 means the first 48 bits (2001:0db8:abcd) identify the network, while the remaining 80 bits can be assigned to hosts — giving 280 ≈ 1.2 × 1024 total addresses.

Standard IPv6 Prefix Sizes

PrefixTypical UseAddresses
/32ISP allocation from RIR2⁹⁶ ≈ 7.9×10²⁸
/48Enterprise / large site2⁸⁰ ≈ 1.2×10²⁴
/56Home ISP allocation2⁷² ≈ 4.7×10²¹
/64Single LAN subnet2⁶⁴ ≈ 1.8×10¹⁹
/128Single host / loopback1

How the Calculator Computes Results

IPv6's 128-bit address space vastly exceeds JavaScript's 53-bit safe integer limit, so this tool uses native BigInt arithmetic throughout:

  • Network address: networkAddr = ipInt & (ALL_ONES << (128 − prefixLen)) — all host bits are zeroed.
  • Last address: lastAddr = networkAddr | ~mask & ALL_ONES — all host bits set to 1.
  • Total addresses: 2n ** BigInt(128 − prefixLen)
  • Sub-prefix step: step = 2n ** BigInt(128 − newPrefixLen) for splitting.

The calculator also converts addresses between expanded (all 32 hex digits) and compressed RFC 5952 notation (longest run of zeros collapsed to ::).

IPv6 Address Type Classification

IPv6 reserves different prefixes for different purposes. The calculator automatically identifies the address type, scope, and global routability:

  • Global Unicast (GUA)2000::/3. The most common type; publicly routable on the internet.
  • Link-Local Unicast (LLA)fe80::/10. Used for communication within a single network segment only; never routed globally.
  • Unique Local (ULA)fc00::/7. The IPv6 equivalent of RFC 1918 private ranges; routable within an organization but not on the public internet.
  • Multicastff00::/8. Used for one-to-many delivery; individual host addresses are not assigned.
  • Loopback::1/128. The host's own address, equivalent to IPv4's 127.0.0.1.
  • Teredo (2001::/32) and 6to4 (2002::/16) — legacy transition mechanisms embedding IPv4 addresses in IPv6 prefixes.

Prefix Boundary Alignment

A prefix is aligned when all bits beyond the prefix length are zero. If you enter 2001:db8::1/48, the ::1 sets host bits that should be zero — the calculator warns you and shows the correct aligned network address (2001:db8::/48). Misaligned prefixes are technically valid IP addresses, but they are not network addresses; routers expect aligned prefixes in routing tables.

Prefix Splitting

The prefix splitting feature divides a given IPv6 block into a power-of-2 number of equal sub-prefixes. Splitting a /48 into 4 yields four /50 blocks; splitting into 256 yields 256 /56 blocks. Each sub-prefix is displayed with its CIDR notation, first host, and last host. The full list can be exported as a CSV for use in IP address management (IPAM) systems.

Binary Bit-Field Visualization

The binary view renders all 128 bits of the input address as a color-coded strip: blue bits represent the network portion (determined by the prefix length), and orange bits represent the host portion. This visualization makes it immediately clear how much of the address space is dedicated to the network versus individual hosts.

Practical Use Cases

  • ISP / RIR allocation planning — verify that customer allocations are correctly aligned and non-overlapping before provisioning.
  • Datacenter segmentation — divide a /48 into per-rack or per-zone /56 blocks and confirm total host capacity.
  • Firewall and ACL rule authoring — confirm the exact range covered by a CIDR rule before writing it into a policy.
  • Education — understand the relationship between prefix length, host count, and address type through live examples.
  • Debugging — identify whether a misconfigured device is using a link-local, ULA, or documentation address instead of a publicly routable GUA.

Accuracy and Limitations

All calculations use exact BigInt arithmetic — there is no floating-point rounding error, even for the largest possible block (::/0 with 2128 ≈ 3.4 × 1038 addresses). The tool validates both the IPv6 address format and the prefix length before computing results. Note that IPv6 does not have a "broadcast" address — the last address in a block is simply the highest host address, and it can be assigned to a host (unlike IPv4 broadcast).

Frequently Asked Questions

Is the IPv6 Prefix Calculator free?

Yes, IPv6 Prefix Calculator is totally free :)

Can I use the IPv6 Prefix Calculator offline?

Yes, you can install the webapp as PWA.

Is it safe to use IPv6 Prefix Calculator?

Yes, any data related to IPv6 Prefix Calculator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does the IPv6 Prefix Calculator work?

Enter any valid IPv6 address in full or compressed notation along with a CIDR prefix length (0–128). The calculator uses 128-bit BigInt arithmetic to zero out the host bits and derive the network address, first and last usable host addresses, total address count, and other properties of the prefix block.

What is a prefix length in IPv6, and how is it different from a subnet mask?

A prefix length in IPv6 (written as /48, /64, etc.) specifies how many of the leftmost 128 bits identify the network, equivalent to an IPv4 subnet mask but expressed purely as a bit count. IPv6 has no concept of a traditional dotted-decimal subnet mask — CIDR notation is the only standard.

What does 'boundary alignment' mean?

A prefix is 'aligned' when all host bits (bits beyond the prefix length) are zero. For example, 2001:db8::1/48 is not aligned because bit 80+ should be zero but the ::1 sets the last bit. The tool warns you and shows the correct aligned network address (2001:db8::/48).

How are the total addresses calculated?

The total number of addresses in a /N prefix is 2^(128−N). For a /64, that is 2^64 ≈ 1.844 × 10^19. Because these numbers greatly exceed JavaScript's safe integer range, the calculator uses native BigInt arithmetic to produce exact results.

What is the prefix splitting feature?

Prefix splitting divides a given IPv6 block into a chosen number of equal sub-prefixes. The count must be a power of 2 (2, 4, 8, 16, …). For example, splitting a /48 into 4 yields four /50 blocks. The tool lists each sub-prefix in CIDR notation with its first and last address.

What address types does the classifier identify?

The classifier identifies Global Unicast (GUA), Link-Local Unicast (fe80::/10), Unique Local (fc00::/7), Multicast (ff00::/8), Loopback (::1), Unspecified (::), IPv4-Mapped, Teredo (2001::/32), 6to4 (2002::/16), and Documentation/Reserved ranges. The scope and global routability status are shown alongside the type.