IPv6 Range Calculator
Find IPv6 prefix boundaries.
IPv6 Range Calculator: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related IPv6 ToolsAll Tools
IPv6 Subnet Calculator
Calculate prefix details and address counts.
IPv6 /127 Link Planner
Divide a parent prefix into address pairs.
IPv6 /128 Address Calculator
Calculate single-address IPv6 prefix details.
IP Address Validator
Check IPv4 or IPv6 address syntax.
IPv6 Binary Converter
Display address bits.
IPv6 Integer Converter
Convert IPv6 addresses to integer values.
How IPv6 Range Calculator Works?
This tool works by converting the 128-bit address to an integer, clearing the host bits for the first address, and setting the host bits for the last address. The calculator uses BigInt math, so no bits are lost.
Enter an IPv6 address and prefix
Type a value such as
2001:db8:abcd:1234:5678:9abc:def0:1234/52. Compressed forms such as2001:db8::/32work too.Expand to 128 bits
The calculator restores every omitted group, giving 8 groups of 16 bits.
Mask the prefix
The first 52 bits stay. The remaining 76 bits become 0 for the start and 1 for the end.
Print both endpoints
Both endpoints appear in compressed RFC 5952 form, with the address count.
IPv6 Range Calculator Formula
The formula is Start = IP AND Mask, End = Start OR (2^(128 − p) − 1), and Count = 2^(128 − p).
Range start
Start = IP AND (2^128 − 2^(128−p))Host bits set to 0.
Range end
End = Start + 2^(128−p) − 1Host bits set to 1.
Address count
Count = 2^(128 − p)A /64 holds 2^64 addresses.
Nibble boundary
p mod 4 = 0Prefixes on 4-bit boundaries change whole hex digits.
Worked example: 2001:db8:abcd:1234:5678:9abc:def0:1234/52
Groups 1–3 (48 bits) kept: 2001:db8:abcd Group 4 = 1234 → first hex digit kept (4 bits) → 1000 / 1fff Start = 2001:db8:abcd:1000:: End = 2001:db8:abcd:1fff:ffff:ffff:ffff:ffff Count = 2^76 = 75,557,863,725,914,323,419,136
IPv6 Range Calculator Conversion Table
The table shows the start and end of the block containing 2001:db8:abcd:1234:5678:9abc:def0:1234 at 12 prefix lengths.
| Prefix | Range Start | Range End | Addresses |
|---|---|---|---|
| /32 | 2001:db8:: | 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff | 7.92 × 10^28 |
| /40 | 2001:db8:ab00:: | 2001:db8:abff:ffff:ffff:ffff:ffff:ffff | 3.09 × 10^26 |
| /48 | 2001:db8:abcd:: | 2001:db8:abcd:ffff:ffff:ffff:ffff:ffff | 1.20 × 10^24 |
| /52 | 2001:db8:abcd:1000:: | 2001:db8:abcd:1fff:ffff:ffff:ffff:ffff | 7.55 × 10^22 |
| /56 | 2001:db8:abcd:1200:: | 2001:db8:abcd:12ff:ffff:ffff:ffff:ffff | 4.72 × 10^21 |
| /60 | 2001:db8:abcd:1230:: | 2001:db8:abcd:123f:ffff:ffff:ffff:ffff | 2.95 × 10^20 |
| /64 | 2001:db8:abcd:1234:: | 2001:db8:abcd:1234:ffff:ffff:ffff:ffff | 1.84 × 10^19 |
| /80 | 2001:db8:abcd:1234:5678:: | 2001:db8:abcd:1234:5678:ffff:ffff:ffff | 281,474,976,710,656 |
| /96 | 2001:db8:abcd:1234:5678:9abc:: | 2001:db8:abcd:1234:5678:9abc:ffff:ffff | 4,294,967,296 |
| /112 | 2001:db8:abcd:1234:5678:9abc:def0:0 | 2001:db8:abcd:1234:5678:9abc:def0:ffff | 65,536 |
| /120 | 2001:db8:abcd:1234:5678:9abc:def0:1200 | 2001:db8:abcd:1234:5678:9abc:def0:12ff | 256 |
| /124 | 2001:db8:abcd:1234:5678:9abc:def0:1230 | 2001:db8:abcd:1234:5678:9abc:def0:123f | 16 |
What is IPv6 Range Calculator?
The IPv6 Range Calculator is a tool that returns the first and last address of the IPv6 block defined by an address and a prefix length.
IPv6 addresses are 128 bits long, written as 8 groups of 4 hexadecimal digits. Prefixes range from /0 to /128, and block sizes grow far beyond IPv4: a single /64 holds 18,446,744,073,709,551,616 addresses. Standard 64-bit floating point loses precision at that scale, so the calculator uses arbitrary-precision integers.
The endpoints appear in RFC 5952 compressed form, which drops leading zeros and replaces the longest run of zero groups with ::.
What are the uses of IPv6 Range Calculator?
There are 5 main uses of the IPv6 Range Calculator, including firewall ranges, log filtering, and allocation checks.
Writing IPv6 firewall ranges
Some firewalls accept ranges instead of prefixes. The calculator produces both endpoints.
Filtering IPv6 logs
Log queries on integer columns need the numeric start and end of a prefix.
Checking RIR allocations
A /32 from an RIR spans from
2001:db8::to2001:db8:ffff:ffff:ffff:ffff:ffff:ffff.Reading geolocation feeds
Many feeds store IPv6 data as start–end pairs, matching the calculator output.
Teaching IPv6 prefixes
Students see how non-nibble prefixes such as /52 split a hex digit.