How to use
- Enter the network to divide, such as 192.168.1.0/24 or 10.0.0.0/16.
- List each subnet with the number of hosts it needs; add or remove rows as needed.
- Read the allocation table, then copy it into your documentation or spreadsheet.
Options explained
- Hosts needed
- Devices that need an address, including the gateway. Each subnet also uses a network and a broadcast address.
- Spare hosts
- Addresses left in the block beyond what you asked for — room for growth.
- Free blocks
- Unallocated space after the last subnet, split into aligned blocks you can still assign.
Worked example
Divide 192.168.1.0/24 into four subnets needing 100, 50, 10 and 2 hosts. Each subnet gets the smallest block that holds its hosts plus the network and broadcast addresses, largest first:
| Subnet | Hosts needed | Network | Mask | Usable range | Broadcast | Spare hosts |
|---|---|---|---|---|---|---|
| Engineering | 100 | 192.168.1.0/25 | 255.255.255.128 | .1 – .126 | 192.168.1.127 | 26 |
| Sales | 50 | 192.168.1.128/26 | 255.255.255.192 | .129 – .190 | 192.168.1.191 | 12 |
| Management | 10 | 192.168.1.192/28 | 255.255.255.240 | .193 – .206 | 192.168.1.207 | 4 |
| Router link | 2 | 192.168.1.208/30 | 255.255.255.252 | .209 – .210 | 192.168.1.211 | 0 |
That uses 212 of the 256 addresses. The remaining 44 are listed under Free blocks left: 192.168.1.212/30, 192.168.1.216/29 and 192.168.1.224/27. The prefix is 32 minus the next whole power of two that fits (hosts + 2), so 100 hosts need 102 addresses, which rounds up to 128 and a /25.
Frequently asked questions
Why are subnets allocated from largest to smallest?
A block of 2ⁿ addresses must start at a multiple of 2ⁿ. Placing the largest blocks first keeps every later block aligned, so no addresses are lost to gaps.
How many hosts fit in a /30, /29 or /24?
2, 6 and 254 — the block size minus the network and broadcast addresses.
Does it support IPv6?
No. IPv6 subnets are normally all /64, so variable-length subnetting is mainly an IPv4 task. Use the IP Subnet (CIDR) Calculator for IPv6 networks.
Privacy
This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.