Plan an IP allocation: addresses needed today and after growth, the CIDR prefix that fits and the waste it leaves.
Because subnets only come in powers of two, the honest requirement is rounded up to the next binary boundary and everything between the two figures is waste. Aggregating the individual subnets needs a further log2 of the subnet count in shorter prefix bits. Right-sizing on the first pass avoids the two classic failures: a /24 for eight routers, and a subnet that runs out three months after go-live and forces a renumber.
IP Address Capacity
addresses = hosts × (1 + growth) + reservations + 2; prefix length = 32 − ceil(log2(addresses)).
addresses = hosts × (1 + growth) + reservations + 2; prefix length = 32 − ceil(log2(addresses)). Because subnets only come in powers of two, the honest requirement is rounded up to the next binary boundary and everything between the two figures is waste. Aggregating the individual subnets needs a further log2 of the subnet count in shorter prefix bits.
Right-sizing on the first pass avoids the two classic failures: a /24 for eight routers, and a subnet that runs out three months after go-live and forces a renumber.
This calculator takes 4 inputs: Hosts to address today, Expected growth over the plan, Infrastructure addresses reserved, Subnets of this size required. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.