VLSM Subnet Calculator
Allocate differently sized traditional IPv4 LAN subnets inside one parent CIDR from requested usable-host counts.
YOUR CALCULATION
Result
—
Calculation steps
Work through one step at a time or reveal the complete calculation. The steps use your current inputs.
How to calculate
Round each requested host count plus two reserved endpoints to a power-of-two block, sort by size and allocate aligned ranges.
Block size=2^ceil(log₂(hosts+2)), at least 4; prefix=32−log₂(block size)
Worked example
A /24 with requests for 100, 50 and 20 hosts allocates /25, /26 and /27 blocks: 128+64+32=224 addresses. The remaining 32 addresses are unallocated.
Assumptions and input details
1–100 uniquely labelled LANs. Traditional network and broadcast endpoints are reserved in each allocation, with /30 as the minimum block. /31 point-to-point links and /32 host routes are excluded. Largest blocks allocate first; original order resolves ties. Parent host bits are normalized and shown. This is a plan only: no network is contacted or configured and reserved/private-address suitability is not checked.
References: RFC 1878: IPv4 variable-length subnet tables
Using this calculator
Can I enter my own problem?
Yes. Replace the example values with your own inputs. The result, calculation steps, tables and applicable diagrams update from those inputs. Blank or invalid values clear the result; example values are never silently substituted for missing inputs.
Are the results exact?
Results use floating-point arithmetic and displayed rounding. Read the formula, assumptions and any stated data precision before interpreting the result.
Is my input uploaded?
The calculation runs in your browser. No account, file upload or external AI service is required. Inputs are not saved between page reloads.
Calculate a CIDR network, mask, full address range, broadcast convention and host range from an IPv4 address and prefix or dotted subnet mask.
Plan mathematical IPv4 fragment sizes for a fixed 20-byte header and entered MTU/DF flag.
Find transfer time, required nominal speed or data size. Distinguish bits, bytes, decimal and binary units and include an explicit effective-throughput percentage.
Reserved advertising space.