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.
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 IPv4 Subnetting & RangeAll Tools
IPv4 Range Calculator
Find address boundaries from a prefix.
IPv4 Subnet Calculator
Calculate subnet details from address and mask.
Network Address Calculator
Find the subnet’s network address.
IPv4 Broadcast Address Calculator
Find broadcast addresses where applicable.
First and Last Address Calculator
Identify a range’s endpoints.
Usable IPv4 Host Range Calculator
Apply the selected subnet-use rules.
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.
Enter the parent block
Type the block to divide, such as
10.0.0.0/16.Enter the subnet count
Type the required number of subnets, such as 50.
Round up to 2^b
The next value of 2^b at or above 50 is 64, so b = 6.
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 + bp is the parent prefix.
Subnets created
2^bEqual to or above S.
Hosts per subnet
2^(32 − c) − 2Check 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 Required | Borrowed Bits | From /16 | Hosts Each (/16) | From /24 | Hosts Each (/24) |
|---|---|---|---|---|---|
| 2 | 1 | /17 | 32,766 | /25 | 126 |
| 3 | 2 | /18 | 16,382 | /26 | 62 |
| 5 | 3 | /19 | 8,190 | /27 | 30 |
| 8 | 3 | /19 | 8,190 | /27 | 30 |
| 10 | 4 | /20 | 4,094 | /28 | 14 |
| 16 | 4 | /20 | 4,094 | /28 | 14 |
| 20 | 5 | /21 | 2,046 | /29 | 6 |
| 30 | 5 | /21 | 2,046 | /29 | 6 |
| 50 | 6 | /22 | 1,022 | /30 | 2 |
| 64 | 6 | /22 | 1,022 | /30 | 2 |
| 100 | 7 | /23 | 510 | Not possible | — |
| 200 | 8 | /24 | 254 | Not 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.