Formula: IPv6 Prefix & /64 Subnets Systems Engineering Formula
- allocatedPrefixLength: Allocated Prefix Length (/prefix)
- targetChildPrefixLength: Target Child Prefix Length (/prefix)
Plan IPv6 /48, /56, and /64 subnet hierarchies from any prefix length.
There are 256 of them. The gap from 56 to 64 is 8 bits, and 2^8 is 256 exactly. Enter 56 as the allocated prefix and leave the target at 64 to see it. In hex, those 256 networks are the last two digits of the fourth group, running 00 to ff, so they are easy to number in order on a home or small office network.
Because a /60 is smaller than a /56. It is one sixteenth of one, so not even a single whole /56 fits inside it. The /64 line still reads 16, since 64 minus 60 is 4 bits. Read both lines as counts of whole blocks. An allocation longer than /64 shows zero for the /64 line for the same reason.
The page refuses it with a message that the child must be the same length or longer than the allocation. With /48 allocated and /40 as the target, there is no result. A shorter prefix is a bigger network, so a /40 cannot be cut from a /48. Swap the two numbers if you meant to ask how many /48s a /40 holds.
Set the target to the full address length and the headline becomes the address count, but the figures are enormous and their last digits are not exact. It is usually more useful to count /64 networks, because a single /64 already has more addresses than any LAN will use, and the network count is what limits a plan.
It is a widely used planning size rather than a law, and providers differ. The page simply tells you what a /48 contains: 65,536 /64 networks or 256 /56 delegations. Ask your provider or regional registry what size they actually assign before you build a plan around it, since that decides your top layer.
No. Prefix lengths are whole numbers of bits, so the page refuses something like 48.4 and asks for a whole number. That matches how prefixes work on real routers, where a mask always covers a whole number of leading bits and the count of subnets is always an exact power of two. Round to the length you actually mean.
Four parts need 2 bits, so each part is a /50. Enter /48 and /50 to confirm the headline reads 4. A /50 splits a hex digit, which makes the addresses less readable. Many planners prefer to split at /52 into 16 parts and hand out groups of four, so every boundary sits on a hex digit.
Counts up to about nine quadrillion, 2^53, are exact, which covers 4,294,967,296 for a /32 and far beyond. Past that, a browser cannot hold every digit of a whole number, so the last digits of the figure drift. If you need an exact figure for a very short prefix, read the subnetting bits line and compute 2 to that power with an integer tool.
Sometimes, for point to point links or loopback addresses, and the page accepts it. Remember the trade off: below /64, SLAAC stops working on that segment. Many operators still reserve a full /64 for each such link and only configure the longer length inside it. That keeps the overall plan on clean /64 boundaries.
Find the smallest power of two that covers your count. 5 bits gives 32, not enough, and 6 bits gives 64. So 40 LANs need 6 bits, which means a /58 if you are aiming for /64 networks. Rounding up to the next hex digit boundary, a /56, gives 256 networks, plenty of spare room and cleaner addresses.
The gap is 16 bits, so 2^16 = 65,536 of them, the same count as /64s in a /48. Enter 32 as the allocated prefix and 48 as the target to confirm it. Any pair of prefixes 16 bits apart gives that figure, which is a useful pattern to remember when sketching a provider level plan on paper.
Two prefix lengths go in: the block you have been given, set to /48, and the size of the pieces you want to cut it into, set to /64. The calculator answers 65,536 child subnets. It also shows the 16 subnetting bits behind that count, the 65,536 standard /64 LANs, and 256 /56 sites inside the same /48.
Every line comes from one rule. A prefix length counts the fixed bits at the front of an address. Going from /48 to /64 frees 64 minus 48 = 16 bits that you can set however you like, and 16 free bits give 2^16 = 65,536 combinations. Each combination is one /64 network.
The /56 line is the same rule with a different child size. From /48 to /56 there are 8 free bits, and 2^8 gives 256 of them. Change the target field to 56 and the headline itself becomes 256 /56 subnets, while the two lines underneath stay put. Those two lines always describe the allocated block only. The target field changes just the headline and the subnetting bits.
The formula is short enough to do mentally once you know a few powers of two. Each extra bit doubles the count. 4 bits is 16, 8 bits is 256, and 16 bits is 65,536 exactly. A useful anchor is that 10 bits is about a thousand, 20 bits about a million and 30 bits about a billion.
Take the ISP preset, a /32 cut into /48 sites. There are 48 minus 32 = 16 free bits, so the headline is again 65,536, this time /48 subnets. The lines underneath describe the whole /32: 32 bits down to /64, which is about four billion, and the page shows 4,294,967,296 /64 LANs. For /56 sites the gap is 24 bits, 16 bits is 65,536 and 8 more bits multiply by 256, and the page gives 16,777,216 of them.
The rule only works one way. The child must be longer than or equal to the parent, because a longer prefix is a smaller network. A /64 fits inside a /48. A /40 does not fit inside a /48; it is the other way round, and the page refuses that pair with a message saying so. When the two lengths are equal there are zero free bits and the answer is 1, the block itself.
An IPv6 address is written as eight groups of four hex digits, and each hex digit stands for exactly 4 bits. That makes prefix lengths that are multiples of four much easier to work with, because the boundary falls between two hex digits instead of in the middle of one.
A /48 fixes the first three groups. Write your block as g1:g2:g3::/48, where the three groups are whatever your provider assigned. The fourth group is yours, and its four hex digits run from 0000 to ffff. Those are the 65,536 /64 networks: g1:g2:g3:0000::/64, then g1:g2:g3:0001::/64, and so on up to g1:g2:g3:ffff::/64.
The /56 boundary sits two hex digits into that fourth group. The first two digits, 00 to ff, pick one of 256 sites. The last two pick one of 256 LANs within that site. So 256 sites with 256 LANs each is again 65,536 in total. Laying out a plan along these digit boundaries means anyone can read the site and the LAN straight off the address.
Prefixes such as /50 or /62 are legal but split a hex digit. A /62 gives 4 /64s, which is fine, but the subnet numbers will look irregular in hex. Most addressing plans stick to /48, /52, /56, /60 and /64 for this reason.
The page gives /64 networks their own line because /64 is the standard size for a LAN. Stateless address autoconfiguration, SLAAC, expects a 64 bit interface identifier, so a LAN smaller than /64 breaks it. That is why the label calls them SLAAC LANs.
The practical consequence is that you plan IPv6 by counting networks, not hosts. A single /64 has far more addresses than any LAN will ever use, so host count is never the limit. The limit is how many separate segments, VLANs or customers you can number. In the default /48 that is 65,536 segments.
Point to point links and loopbacks are sometimes given longer prefixes, and the target field accepts lengths past 64 for those. If you plan to do that, a common approach is still to reserve a whole /64 for each link and only configure the longer prefix inside it, so your plan stays on clean boundaries.
A count of 65,536 /64 networks in a /48 sounds endless, and that feeling leads to sloppy plans. The number is large, but plans get layered, and each layer spends bits. Use 4 bits to mark building or region, 4 bits for function such as users, servers, voice and management, and you have only 8 bits left for the LANs inside each group. That is 256 per group: still plenty, but no longer endless.
So treat the subnetting bits line as a budget. The default gives you 16 bits to spend between /48 and /64. Write down what each slice of those bits means before you assign a single network. If a slice needs room for growth, give it an extra bit now; doubling later usually means renumbering.
It also helps to keep one block in reserve at each layer, often the first or the last. Taking the top /52 of a /48 out of use, for example, costs one sixteenth of the space and leaves a whole tidy range free for something you have not thought of yet.
None of this changes the arithmetic the page does. It changes which two numbers you type in. Instead of one run from /48 to /64, do one run per layer and make sure the bits you spend on each layer add up to the total shown for the direct run.
The comparison presets line up as the layers of a typical plan. The ISP preset takes a /32 and asks how many /48 sites it holds: 65,536 of them. The site preset takes one of those /48s and asks how many /64 LANs it holds: 65,536 again, by the same 16 bit gap. The home preset takes a /56 and asks how many /64 LANs it holds: 256 in all.
Run them in that order and you have walked from a provider block to a single household network. Each step spends some of the bits between the provider's prefix and /64. The /32 has 32 such bits in total; the site layer uses 16, and a /56 home layer would use 8 of the remaining 16, leaving 8 for the LANs inside the home.
Real plans add layers in between, such as regional pools and points of presence, and each one is another run of the page with a new pair of lengths. Leave room at each layer. Using every bit at the top level means no space to grow a region later without renumbering. A common habit is to round each layer up to the next hex digit, so that growth happens within a digit boundary and the plan stays readable.
The two lines under the headline count how many whole /64 LANs and whole /56 sites fit in the allocated block. When the block is smaller than one of those sizes, the count is zero. Enter an allocation of /60 and the page reports 16 /64 networks and 0 /56 sites, because a /60 is only one sixteenth of a /56.
Push the allocation past /64, say a /72 split into /80s, and both lines read 0. The headline still works: a /72 holds 256 /80 subnets. That is the situation for some point to point or internal designs, and the zeros are a reminder that a block that small cannot host a normal SLAAC LAN.
The home preset shows the edge case. A /56 contains exactly one /56, itself, so that line reads 1, while the /64 line reads 256 for the same block. Read the line as how many whole blocks of that size fit, and 1 makes sense.
Before you send a plan to anyone, run three quick tests on it with this page. First, check that each child length is longer than its parent. If you get a pair backwards, the page stops with a message instead of a result, which is your cue to swap them.
Second, check the arithmetic at each layer by multiplying down the tree. If a /48 holds 256 /56s and each /56 holds 256 /64s, the product must equal what the page gives for /48 to /64 directly, which is 65,536 for the default. If your layers do not multiply out to the direct figure, a boundary has been counted twice or skipped.
Third, keep the input range in mind. Prefix lengths must be whole numbers from 1 to the full address length, and a decimal is refused. Very large counts, from very short allocations or very long targets, run past the range where a browser stores whole numbers exactly, so their last few digits are not reliable. For those, use the subnetting bits line and compute the power of two yourself.