ToolNestr

IPv6 Subnet Calculator

Enter an IPv6 prefix (e.g. 2001:db8::/32) to see its network address, the standard hierarchical boundaries (/48 site, /56 subdelegation, /64 LAN), and how many /64 subnets it can contain.

Reviewed by the ToolNestr Editorial Team — July 2026

Enter IPv6 prefix

Understanding IPv6 subnetting

IPv6 subnetting is fundamentally different from IPv4 subnetting. While IPv4 uses 32-bit addresses and frequently subnets at arbitrary bit boundaries to conserve space, IPv6 uses 128-bit addresses and a hierarchical model that allocates addresses in fixed-size blocks. The standard recommendation from the IETF (RFC 3177, updated by RFC 6177) is to assign /48 prefixes to end sites, which provides 65,536 /64 subnets — enough for any organization. The /64 is the universal minimum subnet size because IPv6 stateless address autoconfiguration (SLAAC), defined in RFC 4862, requires 64 bits for the interface identifier.

The hierarchical design of IPv6 addressing matches how the internet is organized. Regional Internet Registries (RIRs) receive /12 prefixes from the Internet Assigned Numbers Authority (IANA). ISPs receive /32 prefixes from their RIR. Customers receive /48 prefixes from their ISP, and within a customer site, individual LAN segments use /64 prefixes. This hierarchy allows efficient route aggregation at every level, keeping the global routing table manageable despite the enormous address space.

This calculator uses JavaScript BigInt for all address arithmetic. IPv6 addresses are 128-bit integers, far exceeding the 53-bit precision of JavaScript's Number type. BigInt, supported in all modern browsers, provides exact arithmetic for 128-bit values. The calculator expands the compressed IPv6 notation, converts the prefix to a BigInt, masks off the host bits to find the network address, then computes how the prefix fits into the standard IPv6 hierarchy.

IPv6 Address Bit Layout with Prefix, Subnet, and Host Parts 128-bit IPv6 address divided into global routing prefix, subnet ID, and interface identifier fields for a /48 prefix 128-bit IPv6 Address — /48 to /64 Subnetting Global Routing Prefix (48 bits) Subnet ID (16 bits) Interface ID (64 bits) Bit 127 Assigned by RIR / ISP Site administrator SLAAC / manual Bit 0 /48 /64 2001:0db8:0000 XXXX Interface identifier (0000:0000:0000:0001) IPv6 address: 2001:db8:XXXX:0000:0000:0000:0000:0001 Global routing prefix Subnet ID Interface ID
A /48 IPv6 prefix divides into a 48-bit global routing prefix, a 16-bit subnet ID providing 65,536 /64 subnets, and a 64-bit interface identifier

IPv6 address structure

An IPv6 address (RFC 4291) is organized as two 64-bit halves: the network prefix (upper 64 bits) and the interface identifier (lower 64 bits). The network prefix can be further subdivided. The most common allocation pattern is /32 for ISPs, /48 for customer sites, /56 for subdelegated blocks, and /64 for individual LAN segments. Each of these boundaries corresponds to a specific power-of-2 count of /64 subnets.

The mathematics using BigInt is straightforward. The calculator expands the input prefix to a full 128-bit BigInt, creates a mask by shifting 1 left by (128 - prefix) and subtracting 1, then applies the mask to find the network address. It then computes how many /64 subnets exist by raising 2 to the power of (64 - prefix) when prefix is less than 64, or 1 when prefix equals 64. For prefixes longer than /64, the result is a fractional subnet, indicating the prefix is smaller than the recommended minimum subnet size.

Common IPv6 prefix sizes and their meanings

/32 — ISP allocation

Assigned by RIRs to Internet Service Providers. Contains 4,294,967,296 /64 subnets. ISPs further subdivide this into /48 and /56 prefixes for their customers.

/48 — Site allocation

Recommended for general sites (RFC 3177). Contains 65,536 /64 subnets. Suitable for enterprises, universities, data centers, and home networks with multiple VLANs.

/56 — Subdelegation

Often used by ISPs for residential customers. Contains 256 /64 subnets. Provides enough space for isolated guest networks, IoT segments, and personal VLANs.

/64 — LAN

The standard size for a single IPv6 subnet. SLAAC requires a /64 to generate interface identifiers. All IPv6-capable hosts and routers expect /64 as the subnet size.

Why BigInt is necessary

JavaScript's Number type uses IEEE 754 double-precision floating point, which provides exactly 53 bits of integer precision. IPv6 addresses are 128 bits, which is more than double that capacity. Any attempt to compute IPv6 addresses with regular JavaScript numbers would lose precision on the least significant bits, producing incorrect results. BigInt (BigInt) was introduced in ES2020 and supports arbitrary-precision integers. All modern browsers, including Chrome 67+, Firefox 68+, Safari 14+, and Edge 79+, support BigInt.

The calculator parses the IPv6 string into a BigInt by splitting on colons, converting each hex group from base 16, and accumulating the result. The subnet mask is a BigInt with the first N bits set to 1. The network address is computed by bitwise AND of the address and mask. The count of /64 subnets is 2^(64 - prefix), which for a /32 prefix equals 2^32 — over 4 billion. This value cannot be represented accurately in a JavaScript Number, but BigInt handles it with no precision loss.

IPv6 addressing best practices

When planning an IPv6 deployment, always use /64 as the subnet size for LAN segments. Avoid using subnets smaller than /64 because SLAAC and neighbor discovery (RFC 4861) rely on the full 64-bit interface identifier. For point-to-point links, /127 (RFC 6164) is acceptable to mitigate neighbor cache exhaustion, but for all other network types, /64 is the standard.

Allocate subnets from the lower bits of the subnet ID space first, leaving the upper bits for future expansion. This is the same principle as VLSM in IPv4, but applied to 16-bit or larger subnet ID fields rather than individual host bits. Document your subnet assignments in an IP address management (IPAM) system to avoid overlaps. Use the site-local prefix fc00::/7 (unique local addresses, RFC 4193) for internal-only services that do not need global reachability, and use global unicast addresses (2000::/3) for publicly accessible services.

Frequently asked questions

Why is /64 the standard subnet size for IPv6?

RFC 4291 specifies that the interface identifier in IPv6 stateless address autoconfiguration (SLAAC) is 64 bits long, derived from the EUI-64 format or privacy extensions. Since SLAAC requires a full /64, subnets smaller than /64 break SLAAC and many IPv6-only features. Internet standards strongly recommend /64 as the minimum subnet size.

What does a /32 prefix mean in IPv6?

A /32 prefix is typically assigned by a Regional Internet Registry (RIR) to an ISP. It contains 2^32 /64 subnets — over 4 billion LANs. ISPs further subdivide this into /48 prefixes for individual customers, /56 for smaller sites, and /64 for individual networks.

What is a /48 used for?

A /48 prefix is the recommended allocation for a general site (RFC 3177). It contains 65,536 /64 subnets, providing enough space for all VLANs, DMZs, guest networks, IoT networks, infrastructure links, and future growth within a single organization or home network.

What is the difference between /48, /56, and /64?

A /48 contains 65,536 /64 subnets, a /56 contains 256 /64 subnets, and a /64 is a single LAN. The hierarchical structure allows ISPs to allocate /48 to large customers, /56 to small sites or home users, and /64 to individual links.

Why can IPv6 addresses not be calculated with regular JavaScript numbers?

IPv6 addresses are 128 bits long, and JavaScript numbers are limited to 53 bits of precision (Number.MAX_SAFE_INTEGER). This calculator uses JavaScript BigInt, which supports arbitrary-precision integers and can handle 128-bit address arithmetic without overflow or rounding errors.

How many /64 subnets are in a /32?

A /32 prefix contains 2^(64 - 32) = 2^32 = 4,294,967,296 /64 subnets. This is over 4 billion individual LANs, which is why IPv6 eliminates the need for NAT — every device can have a globally unique address with plenty of room for growth.

What is the IPv6 address format?

An IPv6 address is 128 bits written as eight groups of four hexadecimal digits separated by colons, e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334. Leading zeros in each group can be omitted, and one contiguous run of zero groups can be replaced with :: (RFC 5952).

Can IPv6 subnets be smaller than /64?

Technically yes, but it is strongly discouraged. Subnets smaller than /64 break SLAAC, neighbor discovery, and many IPv6 features. RFC 7421 recommends /64 as the minimum. The only exception is point-to-point links, where some operators use /127 (RFC 6164) to avoid neighbor cache exhaustion attacks.

All tool categories

Networking & IP Tools (36 tools)
🧮 Everyday (26 tools)
💪 Health & Fitness (30 tools)
💰 Finance (34 tools)
🔢 Math (23 tools)
📄 PDF Tools (10 tools)
🎨 Creators (12 tools)
💻 Developers (24 tools)
⚡ Engineering & Science (24 tools)
⚛️ Physics (48 tools)
🧪 Chemistry (50 tools)
🧬 Biology (50 tools)
🏠 Construction & Home Improvement (105 tools)
👗 Clothing & Garment Tools (68 tools)
🍳 Cooking & Baking (9 tools)
🚗 Automotive (26 tools)
🖼️ Image Tools (13 tools)
🔐 Security & Hash (15 tools)
📝 Text Tools (15 tools)
🔍 SEO Tools (11 tools)
🔄 Converters (69 tools)
🕐 Time & Date (15 tools)
📊 Chart Generators (11 tools)
🕌 Islamic Tools (16 tools)