Overview
Calculates IPv6 subnets with exact 128-bit arithmetic: paste any address in any legal notation - compressed with ::, fully expanded, or with an embedded IPv4 tail - choose a prefix length, and get the compressed (RFC 5952) and expanded forms, the network address, first and last address, the total number of addresses, the prefix mask, and the address type. No lookup tables, no approximations: BigInt math all the way down.
How It Works
Type an IPv6 address and a prefix length (or click a preset: /32 for a registry block, /48 or /56 for a site, /64 for the standard LAN subnet, /127 for a point-to-point link, /128 for a single host). Every field updates live and each value is click-to-copy. Malformed input gets a specific message - too many groups, more than one ::, or an invalid hex group - instead of a wrong answer.
Step-by-Step Usage Guide
- Paste the address in whatever notation you have - the parser accepts compressed, expanded, and IPv4-tail forms.
- Set the prefix length, or use a preset button for the common ones.
- Read the network, first and last address, and the total address count.
- Copy the canonical RFC 5952 form when you need the address in a config file or document.
Technical Specifications & Standards
IPv6 is a 128-bit address space, which no JavaScript number can represent exactly - so this tool parses addresses into BigInt and masks them with a computed prefix mask. Parsing implements RFC 4291's text rules: up to one :: compression (expanding to exactly the number of zero groups needed to total eight 16-bit groups), and embedded IPv4 tails like ::ffff:192.168.0.1, which the RFC defines as the last 32 bits in dotted form. The output formatter implements RFC 5952 canonical text: lowercase hex, no leading zeros, and the longest run of two-or-more zero groups replaced by ::, leftmost on ties - the form every modern tool prints. The totals are worth internalising: a /64 - the standard subnet for every LAN on earth - contains 18,446,744,073,709,551,616 addresses, more than 4 billion times the entire IPv4 internet. Type detection follows IANA's allocations: fe80::/10 link-local, fc00::/7 unique-local, ff00::/8 multicast, 2001:db8::/32 documentation (the range all examples in this tool's text use), and 2000::/3 global unicast.
Targeted Use Cases
- Planning a subnetting scheme: splitting a /48 site allocation into /64 LAN subnets and knowing exactly where each starts and ends.
- Checking whether two addresses share a subnet before debugging a neighbour-discovery or ACL problem.
- Normalising addresses from logs and configs into one canonical RFC 5952 form for comparison.
- Verifying reverse-DNS ip6.arpa boundaries or firewall rule boundaries for a given prefix.
Notes & Gotchas
- Use /64 for ordinary subnets - many protocols (SLAAC, neighbour discovery) assume it, and carving smaller subnets breaks them.
- Reserve /127 for point-to-point links per RFC 6164; a /64 wastes nothing but invites accidental address duplication.
- Always write documentation addresses from 2001:db8::/32 in examples - it is the IANA-reserved documentation range and the calculator flags it as such.
- Read the expanded form when comparing addresses by eye; compressed forms can differ textually while being the same address.
Frequently Asked Questions
Why can't this use normal JavaScript numbers?
JavaScript numbers are 64-bit floats with 53 bits of integer precision - an IPv6 address is 128 bits. All arithmetic here uses BigInt, so a /64 count like 18,446,744,073,709,551,616 is exact, not rounded.
How is the compressed form chosen?
Per RFC 5952: the longest run of consecutive zero groups (two or more) is replaced by ::, with the leftmost run chosen on ties, and single zero groups are never compressed. That yields the one canonical spelling every tool agrees on.
What does 'first address' mean when it equals the network address?
On /127 and /128 prefixes. RFC 6164 made both addresses on a /127 usable, and a /128 is a single host, so the usual network-minus-one and broadcast conventions do not apply. For ordinary prefixes, the first address is network + 1.
Can I enter an address with an IPv4 tail like ::ffff:192.168.1.1?
Yes - the dotted tail is converted to its two 16-bit hex groups per RFC 4291, so ::ffff:192.168.1.1 parses as ::ffff:c0a8:101, and the type detection identifies it as IPv4-mapped.