Free tool

IPv6 subnet calculator

Updated

Enter an IPv6 address with a prefix length. You get the prefix, the first and last address, the compressed and expanded forms, how many /64 subnets it holds, the address type, the reverse DNS name, and how it splits into smaller prefixes. It runs in your browser.

Network bits Interface bits

Split this prefix

#SubnetFirst addressLast address

How big a prefix do I need?

Count the subnets you need, with room to grow. You get the prefix to ask for.

Planning IPv4 too? The IPv4 subnet calculator does the same for IPv4, and the VLSM subnet planner sizes and places a set of IPv4 subnets in one block.

EUI-64 interface ID from a MAC address

SLAAC can build the last 64 bits of an address from the interface's MAC: it puts ff:fe in the middle and flips the universal/local bit (the second-lowest bit of the first byte). Modern Windows, macOS, iOS and Android, and most Linux desktops, use random or stable-private interface IDs instead (RFC 4941, RFC 7217), so you mostly see EUI-64 on routers, switches, printers and embedded devices.

Documenting a dual-stack network?

In NetworkSketch, every VLAN area holds its subnet and gateway, and each device keeps its addresses, so the diagram is the address plan. For IPv4, use the subnet calculator or plan every subnet in a block with the VLSM planner.

Try it, no signup

IPv6 prefix cheat sheet

The prefix lengths you meet in practice. Every LAN is a /64, so the useful question about a bigger prefix is how many /64s it holds.

PrefixTypical use/64 subnetsAddresses
/32An ISP's allocation from a regional registry4,294,967,2962^96 = 79,228,162,514,264,337,593,543,950,336
/48One site of an organization; the longest prefix most networks accept in BGP65,5362^80 = 1,208,925,819,614,629,174,706,176
/56A small site, or a home from many ISPs2562^72 = 4,722,366,482,869,645,213,696
/60A home from some ISPs162^68 = 295,147,905,179,352,825,856
/64One LAN or VLAN; SLAAC needs exactly this12^64 = 18,446,744,073,709,551,616
/112Sometimes used for links or container networks: the last grouppart of one /642^16 = 65,536
/126Point-to-point links, the older habit (like an IPv4 /30)part of one /644
/127Point-to-point links between routers (RFC 6164)part of one /642
/128One address: a loopback or a host routepart of one /641

Even where a link uses a /127, many networks reserve a whole /64 for it in the plan so it can be renumbered without reshuffling.

How IPv6 addresses are shortened

An IPv6 address is 128 bits written as eight groups of four hex digits. RFC 5952 sets one canonical short form, so the same address is always written the same way:

  1. Drop leading zeros in each group. 0db8 becomes db8 and 0000 becomes 0.
  2. Replace the longest run of all-zero groups with ::. Only once per address, because two would make the count ambiguous. If two runs are the same length, shorten the first.
  3. Don't use :: for a single zero group. 2001:db8:0:1:1:1:1:1 stays as it is.
  4. Write hex digits in lowercase.
  5. IPv4-mapped addresses keep the IPv4 part dotted, as in ::ffff:192.0.2.1.
Full formCanonical form
2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1
2001:0db8:0000:0000:0001:0000:0000:00012001:db8::1:0:0:1
2001:0db8:0000:0001:0001:0001:0001:00012001:db8:0:1:1:1:1:1
fe80:0000:0000:0000:0000:0000:0000:0001fe80::1
0000:0000:0000:0000:0000:0000:0000:0001::1
0000:0000:0000:0000:0000:ffff:c000:0201::ffff:192.0.2.1

Software accepts any valid spelling, but logs, configs and tickets are much easier to search when everyone writes the canonical form.

Questions

Why is every LAN a /64?

IPv6 interface IDs are 64 bits (RFC 4291), and SLAAC, the way most hosts give themselves an address, only works on a /64 (RFC 4862). A longer prefix on a LAN breaks SLAAC and the privacy addresses that depend on it. Point-to-point links between routers are the common exception: they often use a /127 (RFC 6164).

How many /64 subnets are in a /48 or a /56?

A /48 holds 65,536 /64s, a /56 holds 256 and a /60 holds 16. Each step of 4 bits multiplies the count by 16, and each single bit doubles it.

Does IPv6 have a broadcast address?

No. IPv6 uses multicast instead, such as ff02::1 for all nodes on a link. The last address in a subnet is an ordinary address. The first one, with an all-zero interface ID, is the subnet-router anycast address (RFC 4291), so don't give it to a host.

What prefix should I ask my ISP for?

Count the LANs and VLANs you need, with room to grow, and round up to a nibble boundary (a multiple of 4 bits). A business site usually gets a /48 and a home a /56 or /60. RIPE-690 recommends a /48 for business customers and a /48 or /56 for homes.

Is anything I type sent anywhere?

No. The calculator runs on this page in your browser, and the page has no analytics or tracking. The address you enter is kept in the part of the link after the # so you can share it, and browsers never send that part to the server.