IPv6 Subnet Calculator: Free CIDR Prefix Tool

IPv6 Subnet Calculator

Calculate IPv6 network boundaries, exact address counts and the input address scope.

Counts include all addresses in the prefix, not a guaranteed number of usable hosts. Scope labels describe the input address; allocation, routing and reachability are not checked.

An IPv6 subnet calculator turns an address and prefix length, such as 2001:db8::/32, into the network address, first and last address, host bits and exact address count. Network engineers, students and sysadmins use it to plan subnets and check prefixes without doing hexadecimal math by hand.

What Is an IPv6 Subnet and Prefix Length?

An IPv6 subnet is a block of consecutive addresses that share the same leading bits, and the prefix length tells you how many leading bits are fixed. In 2001:db8:abcd:12::/64, the first 64 bits identify the network and the remaining 64 bits identify individual interfaces.

An IPv6 address is 128 bits long, written as eight groups of four hexadecimal digits. The prefix length is a number from 0 to 128 written after a slash. The bits that are not part of the prefix are called host bits, and they decide how many addresses the subnet holds: 2 raised to the number of host bits.

Does IPv6 have a subnet mask?

IPv6 does not use dotted subnet masks the way IPv4 does; the prefix length replaces them. If you still want the mask form, a /64 prefix is 64 one-bits followed by 64 zero-bits, which reads as ffff:ffff:ffff:ffff:: in hexadecimal. A /48 reads as ffff:ffff:ffff::. For everyday work, the slash number is all you need.

How is a network address found?

The network address is the input address with every host bit set to zero. For 2001:db8:abcd:12::1/64, you keep the first 64 bits and zero the rest, which gives 2001:db8:abcd:12::. The last address is the same prefix with every host bit set to one.

How to Use the IPv6 Subnet Calculator

You only need one input: an IPv6 address followed by a slash and a prefix length. The steps below match the fields on this page.

  1. Find the box labeled IPv6 Address with Prefix (CIDR notation).
  2. Type or paste your value, for example 2001:db8::/32 or 2001:db8::1/64.
  3. Check that the prefix length is between 0 and 128 and that nothing follows it.
  4. Click Calculate Subnet.
  5. Read the results table: input address, expanded address, prefix length, network address, first address, last address, host bits, total addresses and scope.
  6. Change the prefix length and calculate again to compare how a smaller or larger block changes the address count.

The tool accepts compressed addresses with one double colon, fully written addresses with eight groups, and addresses that end in an embedded IPv4 part, such as ::ffff:192.0.2.1/96.

Worked Example: Splitting Out a /64 LAN

Say you were given 2001:db8:abcd:12::1/64 for a office VLAN and want to confirm its boundaries. Enter that value and click Calculate Subnet. The table shows the following.

  • Expanded Address: 2001:0db8:abcd:0012:0000:0000:0000:0001
  • Network Address: 2001:db8:abcd:12::
  • First Address: 2001:db8:abcd:12::
  • Last Address: 2001:db8:abcd:12:ffff:ffff:ffff:ffff
  • Host Bits: 128 minus 64 equals 64
  • Total Addresses: 18446744073709551616, which is 2 to the 64th power
  • Scope: Documentation (not for public routing)

The scope line appears because 2001:db8::/32 is reserved for examples and documentation. If this were a real deployment, you would swap in the prefix your provider delegated to you. The boundaries tell you the VLAN uses everything from 2001:db8:abcd:12:: to the last address shown, and that the next /64 up starts at 2001:db8:abcd:13::.

How to Read the Results

Each row in the results table answers a specific planning question. Here is what to look for in each one.

Expanded and network addresses

The expanded address writes out all 32 hex digits with leading zeros, which is the easiest form for comparing two addresses digit by digit. The network address is shown in compressed form. If two devices produce different network addresses at the same prefix length, they are on different subnets.

First and last address

These mark the edges of the block. IPv6 has no broadcast address, so the last address is simply the highest address in the range. By convention the first address, with all host bits zero, is reserved as the Subnet-Router anycast address, so avoid assigning it to a host.

Host bits and total addresses

Host bits equal 128 minus the prefix length, and total addresses equal 2 to that power. The count includes every address in the prefix. It is not a promise of usable hosts, because routers, anycast addresses and your own addressing plan take some of them.

Scope of the input address

The scope row classifies the address you typed, not the whole subnet. Labels include loopback, link-local, unique local, multicast, documentation, 6to4, Teredo and global unicast. A global unicast label means the address falls in the 2000::/3 range, but the tool does not verify that it is allocated or routed.

Common prefix sizes at a glance

These sizes are widely used as planning guidelines. Your provider or organization may set different rules.

PrefixNumber of /64 subnetsTypical use
/4865,536A site or organization
/56256A small site or home
/641A single LAN or VLAN
/127Part of one /64Point-to-point links

A /64 is the standard size for ordinary LANs because automatic address configuration expects a 64-bit interface identifier. Splitting a LAN into something smaller than /64 usually breaks that feature, so subnet by moving the prefix between /48 and /64 instead.

Who Uses an IPv6 Subnet Calculator?

Anyone who plans, documents or troubleshoots IPv6 addressing benefits from a quick way to see boundaries and counts. These are the most common situations.

  • Network engineers carve a delegated /48 or /56 into /64 subnets for VLANs, and check where each block begins and ends.
  • Students preparing for networking exams verify their hand calculations of network addresses and address counts.
  • Sysadmins write firewall rules or access lists and confirm that an address falls inside the prefix they intend to allow.
  • Web and SEO teams turning on IPv6 for a site check the address block they were given, then confirm that DNS returns it with an AAAA record lookup.
  • Documentation writers expand and compress addresses so that configuration notes use one consistent format.

Best Practices, Common Mistakes and Troubleshooting

Most bad results come from input formatting, not from the math. Check these points first.

  • Missing prefix length: an address alone, such as 2001:db8::1, is rejected. Add a slash and a number, like /64.
  • Prefix above 128: IPv6 stops at 128. A value like /129, or an IPv4 habit such as /255, returns an error.
  • Two double colons: an address can contain only one ::. Write 2001:db8::1:0:0:1 with the zeros spelled out, not 2001::db8::1.
  • Too many or invalid groups: each group holds at most four hex digits, and without a double colon you need exactly eight groups.
  • Spaces or brackets: remove URL brackets, zone identifiers like %eth0 and any text after the prefix.
  • Network address looks different from your input: that is expected when your input has host bits set. The tool zeroes them, so 2001:db8::1/64 gives 2001:db8::.

Write the prefix you plan to use, not the one you are guessing at. If a router advertises a /64 but you enter a /48, the boundaries and counts will describe a much larger block than the one you actually have.

When you need IPv4 work instead, the Subnet CIDR calculator covers masks and usable hosts, and the CIDR to IP range converter handles IPv4 ranges. To check which network owns an address, try the ASN lookup.

Limitations and Accuracy Notes

The calculator performs exact arithmetic on the prefix you enter, so the boundaries and counts are exact, even for huge blocks like a /32 with 2 to the 96th power addresses. What it does not do is judge the address itself.

  • Scope labels describe the input address only. They do not confirm that a range is allocated to anyone, announced in routing, or reachable.
  • Total addresses are not a count of usable hosts.
  • The tool does not split a prefix into a list of child subnets. You can enter each child prefix yourself to inspect it.
  • It does not query DNS or live networks. For records tied to a domain, use a DNS lookup instead.

Check Your IPv6 Prefix Now

You can confirm a network address, range edges and address count in a few seconds, then adjust the prefix length until the plan fits your design. Enter your address with its prefix above and click Calculate Subnet. For more tools like this, browse the Network and IP tools hub.

Frequently Asked Questions

How do I calculate an IPv6 subnet?
Enter an IPv6 address with its prefix length, then click Calculate Subnet. The tool zeroes the host bits to find the network address and sets them to one for the last address. For 2001:db8::1/64, the network address is 2001:db8::.
What is an IPv6 subnet mask?
IPv6 has no dotted subnet mask; the prefix length does that job. A /64 means the first 64 bits are the network part. Written as a mask, that is ffff:ffff:ffff:ffff::, but the slash number is what you enter in this calculator.
How do I find the IPv6 prefix length?
Look for the number after the slash in the address, such as the 64 in 2001:db8:abcd:12::/64. On a device, the interface settings or your provider's delegated prefix show it. This calculator accepts any value from 0 to 128.
What does the IPv6 Subnet Calculator show in its results?
It shows the input address, expanded address, prefix length, network address, first address, last address, host bits, total addresses and the scope of the input address. For a /64, host bits are 64 and total addresses are 18446744073709551616.
Is the total address count the same as usable hosts?
No. Total Addresses counts every address in the prefix, not a guaranteed number of usable hosts. Some addresses, like the all-zeros Subnet-Router anycast address, are reserved by convention, and your own addressing plan may set more aside.
Why does the calculator say my IPv6 address is invalid?
The input is likely missing a slash and prefix, uses a prefix above 128, has more than one double colon, or has a group longer than four hex digits. Fix the format, for example 2001:db8::/32, and calculate again.
Recommended

Explore VPN options

A VPN changes your network exit. It does not guarantee anonymity.

Hide Your IP Encryption Network coverage
Protect My IP Now