Skip to main content
IP Range CalculatorPRO
IPv4 Subnetting & RangeInstant Client-Side Tool

Required Subnet Prefix Calculator

Determine prefix length for subnet quantity.

Required Subnet Prefix Calculator: inputs and results

Enter an IP address, CIDR prefix, or range. Then check its first and last address below.

Quick presets:

Calculated Boundaries & ParametersReady

Network Address192.168.1.0
Broadcast Address192.168.1.255
First Usable Host192.168.1.1
Last Usable Host192.168.1.254
Subnet Mask255.255.255.0
Wildcard Mask0.0.0.255
Total Addresses256
Usable Host Range254

How Required Subnet Prefix Calculator Works?

This tool works by finding the smallest number of borrowed bits that creates at least the requested number of subnets, then adding those bits to the parent prefix.

  1. Enter the parent block

    Type the block to divide, such as 10.0.0.0/16.

  2. Enter the subnet count

    Type the required number of subnets, such as 50.

  3. Round up to 2^b

    The next value of 2^b at or above 50 is 64, so b = 6.

  4. Return the child prefix

    16 + 6 = /22. The plan gives 64 subnets with 1,022 usable hosts each.

Required Subnet Prefix Calculator Formula

The formula is Child Prefix = Parent Prefix + ceil(log2(Subnets Required)).

Borrowed bits

b = ceil(log2(S))

S is the number of subnets required.

Child prefix

c = p + b

p is the parent prefix.

Subnets created

2^b

Equal to or above S.

Hosts per subnet

2^(32 − c) − 2

Check this value against the host requirement.

Worked example: 50 subnets from 10.0.0.0/16

log2(50)  = 5.64 → ceil = 6 bits
Child     = /16 + 6 = /22
Subnets   = 2^6 = 64 (14 spare)
Hosts     = 2^10 − 2 = 1,022 per subnet

Required Subnet Prefix Calculator Conversion Table

The table lists the child prefix for 12 subnet counts, from a /16 parent and from a /24 parent.

Subnets RequiredBorrowed BitsFrom /16Hosts Each (/16)From /24Hosts Each (/24)
21/1732,766/25126
32/1816,382/2662
53/198,190/2730
83/198,190/2730
104/204,094/2814
164/204,094/2814
205/212,046/296
305/212,046/296
506/221,022/302
646/221,022/302
1007/23510Not possible—
2008/24254Not possible—

What is Required Subnet Prefix Calculator?

The Required Subnet Prefix Calculator is a tool that returns the prefix length needed to split a parent block into a required number of equal subnets.

Subnet counts grow in steps of 2. A requirement of 50 subnets rounds up to 64, which costs 6 borrowed bits. The calculator reports the leftover subnets so the spare capacity is visible.

Requirements for subnets and for hosts pull in opposite directions. The calculator shows the hosts per subnet for every result, which confirms whether both requirements fit in the same parent block.

What are the uses of Required Subnet Prefix Calculator?

There are 4 main uses of the Required Subnet Prefix Calculator, including branch planning, VLAN rollout, and exam practice.

  • Planning branch networks

    A company with 40 branches and a /16 needs 6 borrowed bits, which gives each branch a /22.

  • Rolling out VLANs

    A building with 12 VLANs inside a /20 needs 4 borrowed bits, which gives each VLAN a /24.

  • Checking design feasibility

    The /24 column shows when a parent block is too small, such as 200 subnets inside a /24.

  • Solving "minimum subnets" questions

    Exam questions that give a subnet count and ask for a mask follow the same formula.