Subnet for 20000 hosts
A network that needs 20000 hosts fits in a /17, mask 255.255.128.0, with 32,766 usable addresses.
A network built for 20000 hosts needs a /17. The mask is 255.255.128.0, and its 32,766 usable addresses leave 12,766 spare for growth.
The next smaller block, a /18, only allows 16,382 usable addresses, which is not enough for 20000 hosts. That makes /17 the smallest block that fits.
Enter any address below to see the exact network, broadcast, and host range for a /17 block.
Calculate a /17 network
Accepts CIDR (192.0.2.0/24), IP + mask (192.0.2.0 255.255.255.0), or a bare IP (defaults to /24).
11000000.00000000.00000010.0000000011111111.11111111.10000000.00000000Example: 192.0.2.0/17
Taking 192.0.2.0/17 as a worked example, a /17 block breaks down like this:
| Network address | 192.0.0.0 |
|---|---|
| Usable range | 192.0.0.1 - 192.0.127.254 |
| Broadcast address | 192.0.127.255 |
| Total addresses | 32,768 |
| Usable hosts | 32,766 |
Frequently asked questions
What subnet mask do I need for 20000 hosts?
A network with 20000 hosts fits in a /17, which uses the mask 255.255.128.0 and provides 32,766 usable addresses.
How many addresses does a /17 block have in total?
A /17 has 32,768 total addresses, 32,766 of them usable (the total minus the network and broadcast addresses, except for /31 and /32).
Does a /17 waste any addresses for 20000 hosts?
Yes, 12,766 addresses of headroom. A /17 provides 32,766 usable addresses for the 20000 you need, and the next smaller block, a /18, does not hold enough.
How do I work this out myself?
Find the smallest power of two, minus two, that is at least 20000. That takes 15 host bits, which leaves a /17 prefix. See how to calculate a subnet mask for the full method.