Hosts to Subnet Prefix (VLSM) Calculator
Enter hosts needed and growth to get the right subnet size.
Your numbers
%
Your results
Smallest prefix
Smallest prefix
—
Subnet mask
—
Addresses in subnet
—
Usable hosts
—
Spare addresses after growth
—
Utilisation at planned size
—
Hosts to Subnet Prefix (VLSM) Calculator by TheCalcTools
How the Hosts to Subnet Prefix (VLSM) Calculator works
Enter current hosts and the growth you want to allow.
Add the infrastructure addresses (gateway, HSRP/VRRP) and the network and broadcast addresses.
Round up to the next power of two. The prefix is 32 minus the number of host bits.
The formula
Needed = hosts × (1 + growth) + infra + 2Prefix = 32 − ceil(log₂ Needed)
Worked example
Using the default values shown in the calculator:
| Hosts needed today | 120 |
|---|---|
| Growth headroom | 25 % |
| Reserve gateway and HSRP/VRRP addresses | 3 addresses (gateway + 2 routers) |
- 120 hosts + 25% growth + 3 infrastructure addresses + 2 = 256-address block needed after rounding.
- Smallest fit: /24 (255.255.255.0) with 254 usable hosts.
Result:
| Smallest prefix | /24 |
|---|---|
| Subnet mask | 255.255.255.0 |
| Addresses in subnet | 256 |
| Usable hosts | 254 |
| Spare addresses after growth | 101 |
| Utilisation at planned size | 60.2% |
Frequently asked questions
Why add 2 addresses?
Network and broadcast addresses are not assignable to hosts.
Should I plan growth?
Yes. Renumbering a subnet later is far more costly than a few spare addresses.
Sources and further reading
Related calculators
More in IP & Domain Tools · All calculators
This calculator gives estimates for information only. Check important results independently before you rely on them. See our disclaimer.
