Skip to content
Calcrivo

IPv6 Prefix Length Calculator

Choose the right IPv6 prefix length for a required number of subnets and see how much headroom is left.

Inputs

bits
subnets
x

Recommended Subnet Prefix

59

Subnets Available

2,048

Headroom vs Requirement

582.7%

Subnet Bits Used

11

Step by step

  1. Values used

    Allocated site prefix = 48 bits; Subnets needed today = 300 subnets; Planned growth multiple = 4 x

  2. IPv6 Prefix Length

    subnet bits = ceil(log2(subnets needed × growth)); prefix = site prefix + subnet bits, capped at /64.

  3. Recommended Subnet Prefix

    = 59

  4. Subnets Available

    = 2,048

  5. Headroom vs Requirement

    = 582.7

  6. Subnet Bits Used

    = 11

How it works

Subnet count is always a power of two, so the required bits are the base-2 logarithm of the target rounded up. Standard practice stops at /64 because SLAAC and many hardware pipelines assume a 64-bit interface identifier. Prefix length is the one IPv6 decision that is expensive to reverse: it is embedded in DNS, ACLs, route filters and monitoring long before anyone revisits it.

Formula

IPv6 Prefix Length

subnet bits = ceil(log2(subnets needed × growth)); prefix = site prefix + subnet bits, capped at /64.

site
Prefix length allocated to the site
bitsUsed
Bits spent on the subnet field

Frequently Asked Questions

How is IPv6 Prefix Length calculated?

subnet bits = ceil(log2(subnets needed × growth)); prefix = site prefix + subnet bits, capped at /64. Subnet count is always a power of two, so the required bits are the base-2 logarithm of the target rounded up. Standard practice stops at /64 because SLAAC and many hardware pipelines assume a 64-bit interface identifier.

Why does IPv6 Prefix Length matter?

Prefix length is the one IPv6 decision that is expensive to reverse: it is embedded in DNS, ACLs, route filters and monitoring long before anyone revisits it.

What values do I need to enter?

This calculator takes 3 inputs: Allocated site prefix, Subnets needed today, Planned growth multiple. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.

You might also need