IPv6 Host Range Calculator
Show the first and last address inside an IPv6 prefix along with the size of the address space it covers.
Inputs
First Address
2001:db8:acad:1::
Last Address
2001:0db8:acad:0001:ffff:ffff:ffff:ffff
Addresses in Prefix
18,446,744,073,709,552,000
Equivalent /64 Subnets
1
Step by step
Values used
IPv6 address = 2001:db8:acad:1::; Prefix length = 64 bits
IPv6 Host Range
first = address AND mask, last = first OR NOT(mask), count = 2^(128 − prefix).
First Address
= 2001:db8:acad:1::
Last Address
= 2001:0db8:acad:0001:ffff:ffff:ffff:ffff
Addresses in Prefix
= 18,446,744,073,709,552,000
Equivalent /64 Subnets
= 1
How it works
Clearing every host bit gives the first address; setting them all gives the last. Because IPv6 has no broadcast address, both ends of the range are usable, although the all-zeros address is reserved as the subnet-router anycast address. Explicit bounds are what you paste into firewall objects and DDoS scrubbing policies, and they make it obvious when two prefixes overlap.
Formula
IPv6 Host Range
first = address AND mask, last = first OR NOT(mask), count = 2^(128 − prefix).
- p
- Prefix length in bits
- mask
- Prefix mask applied per 16-bit group
Frequently Asked Questions
How is IPv6 Host Range calculated?
first = address AND mask, last = first OR NOT(mask), count = 2^(128 − prefix). Clearing every host bit gives the first address; setting them all gives the last. Because IPv6 has no broadcast address, both ends of the range are usable, although the all-zeros address is reserved as the subnet-router anycast address.
Why does IPv6 Host Range matter?
Explicit bounds are what you paste into firewall objects and DDoS scrubbing policies, and they make it obvious when two prefixes overlap.
What values do I need to enter?
This calculator takes 2 inputs: IPv6 address, Prefix length. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.