Calculator inputs
Enter a base IPv4 network and subnet host requirements. The page allocates efficiently using variable length subnet masking.
Example data table
| Segment | Requested Hosts | Suggested Block | Suggested Prefix | Usable Hosts |
|---|---|---|---|---|
| HQ Users | 100 | 128 addresses | /25 | 126 |
| Servers | 50 | 64 addresses | /26 | 62 |
| Voice VLAN | 25 | 32 addresses | /27 | 30 |
| IoT Devices | 12 | 16 addresses | /28 | 14 |
Formula used
1. Required block size: choose the smallest power of two that can hold requested hosts plus network and broadcast addresses.
Block size = 2ceil(log2(hosts + 2))
2. Prefix length: subtract the host-bit count from 32.
Prefix = 32 - log2(block size)
3. Usable hosts: for normal LAN subnets, usable hosts equal block size minus 2.
Usable hosts = block size - 2
4. Utilization: compare requested hosts with usable capacity.
Utilization % = (requested hosts / usable hosts) × 100
The calculator sorts subnet requests from largest to smallest, then assigns aligned address blocks sequentially within the chosen base network.
How to use this calculator
- Enter a base IPv4 network in CIDR notation, such as 10.10.0.0/24.
- Add each department, VLAN, branch, or service as a separate subnet row.
- Enter the host count needed for every subnet, including near-term growth.
- Press Calculate VLSM Plan to generate the allocation summary and table.
- Review utilization, unused capacity, and address fit before implementation.
- Export the output as CSV for spreadsheets or PDF for documentation.
Frequently asked questions
1. What does VLSM mean?
VLSM stands for Variable Length Subnet Masking. It lets one network use different prefix lengths so each segment gets only the address space it actually needs.
2. Why are subnets sorted by size first?
Allocating the largest requirements first reduces fragmentation. That approach helps fit more subnet blocks inside the base network and lowers the chance of wasting valuable address space.
3. Does the calculator include network and broadcast addresses?
Yes. The block size calculation adds two reserved addresses for typical IPv4 LAN subnets, then reports usable host capacity after subtracting them.
4. Can I plan future growth with it?
Yes. Enter projected host counts instead of current counts. That gives each subnet enough headroom and reduces the need for disruptive redesign later.
5. What happens when the base network is too small?
The calculator stops allocation and shows an error. That warns you that the chosen parent block cannot fit every requested subnet requirement.
6. Does it work for IPv6?
No. This implementation is designed for IPv4 VLSM planning. IPv6 subnetting follows different allocation practices and usually uses fixed /64 LAN segments.
7. What is wildcard mask output used for?
Wildcard masks are often used in routing and access-control configurations. They represent the inverse of the subnet mask and help define matching ranges.
8. Why export CSV or PDF?
CSV helps with audits, change records, and spreadsheet review. PDF is useful for sharing a stable subnet plan with operations, security, or project teams.