BYTETOOLS

IPv6 Subnet Calculator

Calculate IPv6 subnets online: network prefix, first and last address, total addresses and expanded/compressed forms for any /0–/128 prefix. 100% in-browser.

/64
Prefix
2^64
Total addresses
64
Host bits

Network prefix

2001:db8:abcd:1234::/64

First address in subnet

2001:db8:abcd:1234::

Last address in subnet

2001:db8:abcd:1234:ffff:ffff:ffff:ffff

Your address — expanded

2001:0db8:abcd:1234:0000:0000:0000:0001

Your address — compressed (RFC 5952)

2001:db8:abcd:1234::1

Total addresses (exact)

2^64 = 18446744073709551616

Last address — expanded

2001:0db8:abcd:1234:ffff:ffff:ffff:ffff

What is the IPv6 Subnet Calculator?

The ByteTools IPv6 Subnet Calculator takes any IPv6 address and prefix length and works out the network prefix, the first and last address in the subnet, the exact number of addresses (both as a power of two and written out in full) and the expanded and RFC 5952 compressed forms of the address.

  • Handles compressed (::) and fully expanded input, including embedded IPv4 endings
  • Correct masking across hextet boundaries for any /0–/128 prefix
  • Exact address counts — 2^64 shown in full as 18,446,744,073,709,551,616-style decimals
  • Outputs both expanded and RFC 5952 canonical compressed forms
  • First and last address of the subnet with one-click copy
  • 100% client-side — no lookups, nothing leaves your browser

How to use the IPv6 Subnet Calculator

  1. 1

    Type or paste an IPv6 address — compressed (2001:db8::1) or fully expanded notation both work.

  2. 2

    Set the prefix length between 0 and 128 (a LAN is normally /64).

  3. 3

    Read off the network prefix, first and last address, and the total address count.

  4. 4

    Copy any value with its copy button, including the exact decimal address count.

About the IPv6 Subnet Calculator

The ByteTools IPv6 Subnet Calculator takes any IPv6 address and prefix length and works out the network prefix, the first and last address in the subnet, the exact number of addresses (both as a power of two and written out in full) and the expanded and RFC 5952 compressed forms of the address.

It is built for network engineers planning IPv6 addressing, students learning how 128-bit prefixes split across hextet boundaries, and anyone who needs a quick sanity check on a /48, /56 or /64 allocation. Odd prefix lengths like /50 or /61, which cut through the middle of a hextet, are handled correctly.

Everything is pure 16-bit hextet arithmetic computed 100% locally in your browser — nothing is sent to a server, no address you type is logged, and the calculator keeps working offline.

Frequently asked questions

How do I calculate an IPv6 subnet?

Convert the address to its eight 16-bit hextets, keep the first N bits as the network prefix and zero the rest. The first address is the prefix itself and the last address has all remaining host bits set to one. This calculator does that bit-masking for you and shows both boundaries instantly.

Why is /64 the standard IPv6 subnet size?

A /64 gives 64 bits to the network and 64 to the host, which is what SLAAC address autoconfiguration requires to work. Almost every LAN segment should be a /64 — ISPs then hand out a /48 or /56 so you have thousands of /64s to assign.

How many addresses are in an IPv6 /64?

A /64 contains 2^64 addresses — 18,446,744,073,709,551,616, about 18.4 quintillion. That is more addresses in one LAN subnet than the entire IPv4 internet squared has room for, which is why IPv6 planning counts subnets rather than hosts.

Does IPv6 have network and broadcast addresses like IPv4?

No. IPv6 has no broadcast address at all — it uses multicast instead — and the all-zero address of a subnet (the Subnet-Router anycast address) is usable in practice. So all 2^(128−prefix) addresses count, unlike IPv4 where two are traditionally reserved.

Can I use this calculator for prefixes that don't end on a colon boundary, like /50?

Yes. Prefixes that cut through the middle of a hextet are the case people get wrong by hand, and the calculator masks individual bits correctly. For example 2001:db8:abcd:1234::/50 has the network 2001:db8:abcd:: and a last address ending in 3fff:ffff:ffff:ffff:ffff.

Is my IPv6 address uploaded when I use this tool?

No. The subnet math runs entirely in your browser with JavaScript — no address is transmitted, logged or stored anywhere. You can load the page, go offline and keep calculating.

Related tools