Formula Used
Extended prefix: extended prefix = base prefix + borrowed bits
Borrowed bits from subnet count: borrowed bits = ceil(log2(desired subnets))
Total subnets: 2 ^ borrowed bits
Addresses per subnet: 2 ^ (32 - extended prefix)
Usable hosts: addresses per subnet - 2 for normal IPv4 subnets.
Subnet increment: block size = addresses per subnet
The calculator also handles /31 and /32 networks. A /31 can hold two point-to-point addresses. A /32 represents one exact host address.
How To Use This Calculator
Enter an IPv4 address and its base prefix. Select a calculation mode. Use borrowed bits when you already know how many bits you want to extend. Use desired subnets when you know the number of subnet blocks needed. Use desired hosts when host capacity is the main planning target.
Click the calculate button. The result appears above the form and below the header. Review the extended prefix, subnet mask, wildcard mask, usable hosts, and selected subnet range. Use the subnet index field to inspect a specific subnet inside the base network.
Download the CSV file for spreadsheet work. Download the PDF file for reports, notes, and documentation.
Planning Extended Network Prefixes
An extended network prefix shows how far a subnet is extended beyond its starting prefix. It is created when host bits are borrowed and used as extra network bits. This change affects every part of a subnet plan. It controls the number of subnets, the size of each block, the available host addresses, and the network boundaries.
Why Prefix Extension Matters
Network teams often begin with a larger block. Then they divide it into smaller blocks for departments, branches, labs, servers, guests, or routing zones. A clear extended prefix avoids overlap. It also makes address use easier to audit. When the prefix is too short, each subnet may waste many addresses. When it is too long, each subnet may not support enough devices.
Borrowed Bits And Subnet Size
Borrowed bits are the key input. If a /24 network borrows three bits, the new prefix becomes /27. That creates eight subnets. Each subnet has thirty-two addresses. In normal IPv4 use, thirty addresses are usable because the first address is the network address and the last address is the broadcast address.
Practical Address Planning
This calculator helps compare subnet count and host capacity before a plan is deployed. It can also show a selected subnet by index. That is useful when documenting ranges for firewall rules, DHCP scopes, VLANs, and routing summaries. The preview table shows the first generated subnet blocks, so errors are easier to catch early.
Better Documentation
Export options make the result reusable. CSV output supports spreadsheets and inventory systems. PDF output helps with tickets, approvals, and network change records. The chart gives a quick visual view of subnets, usable hosts, and prefix length. Together, these details create a cleaner and safer IPv4 subnet plan.
FAQs
1. What is an extended network prefix?
It is the new prefix length after borrowing host bits. For example, extending a /24 by three bits creates a /27 prefix.
2. What are borrowed bits?
Borrowed bits are host bits converted into network bits. They increase subnet count but reduce the number of host addresses per subnet.
3. How is the subnet mask calculated?
The subnet mask is created from the extended prefix. A /26 prefix becomes 255.255.255.192 because twenty-six mask bits are set.
4. Why are two addresses usually removed?
Most IPv4 subnets reserve the first address for the network and the last address for broadcast. That leaves total addresses minus two.
5. Can this calculator handle /31 networks?
Yes. A /31 is treated as a point-to-point subnet with two usable addresses. It does not follow the usual minus-two rule.
6. What does subnet index mean?
Subnet index chooses which generated subnet to inspect. Index 0 is the first subnet, index 1 is the second, and so on.
7. What is a wildcard mask?
A wildcard mask is the inverse of the subnet mask. It is often used in routing, access control lists, and network matching rules.
8. Can I export the result?
Yes. Use the CSV button for spreadsheet work. Use the PDF button for sharing, documentation, reporting, or change planning.