IPv6 Subnet ID Calculator
Identify subnet bits within a parent.
IPv6 Subnet ID 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 Range Calculator
Find IPv6 prefix boundaries.
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.
How IPv6 Subnet ID Calculator Works?
This tool works by extracting the bits between the parent prefix length and the subnet prefix length. The extracted bits form the subnet ID.
Enter the parent prefix
Type the site prefix, such as
2001:db8:acad::/48.Enter the subnet length
Type the subnet size, usually
/64.Read the subnet ID bits
Bits 49 to 64 form a 16-bit subnet ID, which is the 4th group of the address.
Convert both ways
The calculator turns an address into its subnet ID, or a subnet ID such as 6,699 into the prefix
2001:db8:acad:1a2b::/64.
IPv6 Subnet ID Calculator Formula
The formula is Subnet Prefix = Parent + ID × 2^(128 − s), where s is the subnet prefix length and ID ranges from 0 to 2^(s − p) − 1.
Subnet ID bits
b = s − p64 − 48 = 16 bits.
Subnet ID range
0 … 2^b − 10 to 65,535 for a /48 into /64.
ID from address
ID = (IP >> (128 − s)) AND (2^b − 1)Extracts the field.
Prefix from ID
Parent + ID × 2^(128 − s)Builds the subnet prefix.
Worked example: 2001:db8:acad:1a2b::1 in 2001:db8:acad::/48
Subnet ID field = group 4 = 1a2b 1a2b hex = 1×4,096 + 10×256 + 2×16 + 11 = 6,699 Subnet = 2001:db8:acad:1a2b::/64 ID range = 0 to 65,535
IPv6 Subnet ID Calculator Conversion Table
The table maps 11 subnet IDs inside 2001:db8:acad::/48 to their /64 prefixes, with the hex and binary form of each ID.
| Subnet ID (Decimal) | Hex | Binary (16 bits) | /64 Prefix |
|---|---|---|---|
| 0 | 0 | 0000000000000000 | 2001:db8:acad::/64 |
| 1 | 1 | 0000000000000001 | 2001:db8:acad:1::/64 |
| 2 | 2 | 0000000000000010 | 2001:db8:acad:2::/64 |
| 10 | a | 0000000000001010 | 2001:db8:acad:a::/64 |
| 16 | 10 | 0000000000010000 | 2001:db8:acad:10::/64 |
| 100 | 64 | 0000000001100100 | 2001:db8:acad:64::/64 |
| 255 | ff | 0000000011111111 | 2001:db8:acad:ff::/64 |
| 256 | 100 | 0000000100000000 | 2001:db8:acad:100::/64 |
| 4,096 | 1000 | 0001000000000000 | 2001:db8:acad:1000::/64 |
| 6,699 | 1a2b | 0001101000101011 | 2001:db8:acad:1a2b::/64 |
| 65,535 | ffff | 1111111111111111 | 2001:db8:acad:ffff::/64 |
What is IPv6 Subnet ID Calculator?
The IPv6 Subnet ID Calculator is a tool that identifies the subnet ID bits inside a parent prefix and converts between subnet IDs and subnet prefixes.
An IPv6 global unicast address has 3 parts: the global routing prefix from the ISP or RIR, the subnet ID chosen by the organization, and the interface ID. With a /48 site prefix and /64 subnets, the subnet ID is exactly the 4th group, which gives 65,536 subnets.
Organizations encode meaning into subnet IDs, such as a building number in the first hex digit and a VLAN number in the last 3 digits. The calculator converts those structured IDs into exact prefixes.
What are the uses of IPv6 Subnet ID Calculator?
There are 4 main uses of the IPv6 Subnet ID Calculator, including VLAN mapping, structured addressing, and audits.
Mapping VLANs to subnet IDs
VLAN 100 maps to subnet ID 0x0064 or to the readable 0x0100, depending on the convention.
Designing structured addressing
Plans encode site, building, and function into the 16-bit subnet ID.
Auditing prefix assignments
The calculator extracts the subnet ID from live addresses to check against the plan.
Generating subnet lists
Automation builds prefixes from ID numbers instead of string concatenation.