IPv6 Subnet Calculator

Calculate the IPv6 network, first address, last address, and exact address count from one address and a prefix. Nothing is looked up.

Last updated: October 6, 2026

Tool

This tool will load here.

What this tool does

This IPv6 subnet calculator takes one IPv6 address and a prefix length from 0 to 128 and prints the network that contains that address. The address may use one :: compression, or it may be written as eight groups. A group is one to four hexadecimal digits. Leading zeros inside a group are accepted, so 2001:0db8::1 is the same address as 2001:db8::1. Upper and lower case are both accepted. Every address the page prints is lowercase.

The address field may also end with a slash and a prefix. A separate prefix field is used when the address has no slash. If both are filled and the numbers differ, Calculate stops and clears the previous result. The prefix is an integer from 0 to 128 with no leading zero. 0 is valid. 08 is not.

The arithmetic is integer arithmetic on the 128-bit value. A JavaScript number cannot hold 2 to the power of 128, so the count is an exact integer. The network is the address with the host bits cleared. The first address is the network. The last address is the network plus the address count, minus 1. The address count is 2 to the power of 128 minus the prefix. A /0 has 340282366920938463463374607431768211456 addresses. A /127 has 2. A /128 has 1. The page does not subtract 2, and it does not print a broadcast row.

A /127 may add one note: both addresses are the point-to-point pair from RFC 6164. That note is not a usable-host line. Ordinary prefixes do not reserve two addresses the way an IPv4 /24 does.

The expanded form is eight groups with no leading zeros. A zero group is written as 0. The RFC 5952 line is the same address in the recommended text form: lowercase, no leading zeros, and the longest run of zero groups replaced by ::. A tie between two runs of the same length keeps the leftmost run. A single zero group is not compressed. The network, the first address, and the last address use that same RFC 5952 text.

The range line describes the address you typed, not a routing announcement. The first match wins, and the list is fixed: ::/128 is unspecified, ::1/128 is loopback, ::ffff:0:0/96 is IPv4-mapped, 64:ff9b::/96 is NAT64, 64:ff9b:1::/48 is local-use IPv4/IPv6 translation, 100::/64 is discard, 2001:db8::/32 is documentation, 2001:2::/48 is benchmarking, fc00::/7 is unique local, fe80::/10 is link-local, ff00::/8 is multicast, and 2002::/16 is 6to4. Any other address is labeled not in the special ranges on this page. That label is not a claim that the address is public, routed, reachable, or safe to use.

How to use

  1. Type the address in hexadecimal, with at most one ::, or as eight groups.
  2. If the address has no slash, type the prefix in the prefix field. The prefix is an integer from 0 to 128 with no leading zero.
  3. Choose Calculate, or press Enter in a field. Copy writes the lines you see. Clear empties both fields and the result.

An invalid address, a dotted IPv4 tail, a zone id, a hostname, more than one ::, an empty group that is not part of ::, a prefix outside 0–128, or a slash that disagrees with the prefix field clears the table. The previous network does not stay on screen. Nothing is sent off the page.

Example

2001:0db8::1 with prefix 32 produces expanded form 2001:db8:0:0:0:0:0:1, RFC 5952 text 2001:db8::1, network 2001:db8::, first address 2001:db8::, last address 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff, and address count 79228162514264337593543950336. The range line is documentation. The same network appears if the address field is 2001:DB8::1/32 and the prefix field is left empty. If the prefix field is also 32, the result matches. If the prefix field is 64, Calculate stops because the two prefixes disagree.

2001:db8::5/127 produces a count of 2, first address 2001:db8::4, last address 2001:db8::5, and the RFC 6164 point-to-point note. 2001:db8::5/128 produces a count of 1 and no point-to-point note. ::/128 is unspecified. ::1/128 is loopback. fe80::1/10 is link-local. fd12::1 is unique local. 2001:4860:4860::8888/32 is not in the special ranges on this page. ::ffff:192.0.2.1 is rejected because of the dotted tail. fe80::1%eth0 is rejected because of the zone id. 2001::db8::1 is rejected because it has two compressions. example.com is rejected because it is a hostname.

Limits

  • IPv6 only. One address. Prefix 0–128. No dotted IPv4 tail and no zone id.
  • No DNS, WHOIS, geolocation, or reachability check.
  • No broadcast row and no subtraction of 2. The range list is the list above and nothing else.

The calculation stays in the browser. The address is not stored. A result describes the prefix you typed. It does not tell you whether a host answers, which operator holds the space, or whether a packet would be delivered. The IPv4 subnet calculator is a different page because that family uses a broadcast address and a different host count.

On this page

Related Articles

Related guides

Related solutions

Need another tool ?

Open the free tools — no signup.

FAQs

newsletter signup

Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Innovative Solutions For Modern Needs
Copyright © 2026 Yallasolve. all rights reserved.