Subnet for 25 hosts
A network that needs 25 hosts fits in a /27, mask 255.255.255.224, with 30 usable addresses.
A network built for 25 hosts needs a /27. The mask is 255.255.255.224, and its 30 usable addresses leave 5 spare for growth.
The next smaller block, a /28, only allows 14 usable addresses, which is not enough for 25 hosts. That makes /27 the smallest block that fits.
Enter any address below to see the exact network, broadcast, and host range for a /27 block.
Calculate a /27 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.11111111.11100000Example: 192.0.2.0/27
Taking 192.0.2.0/27 as a worked example, a /27 block breaks down like this:
| Network address | 192.0.2.0 |
|---|---|
| Usable range | 192.0.2.1 - 192.0.2.30 |
| Broadcast address | 192.0.2.31 |
| Total addresses | 32 |
| Usable hosts | 30 |
Frequently asked questions
What subnet mask do I need for 25 hosts?
A network with 25 hosts fits in a /27, which uses the mask 255.255.255.224 and provides 30 usable addresses.
How many addresses does a /27 block have in total?
A /27 has 32 total addresses, 30 of them usable (the total minus the network and broadcast addresses, except for /31 and /32).
Does a /27 waste any addresses for 25 hosts?
Yes, 5 addresses of headroom. A /27 provides 30 usable addresses for the 25 you need, and the next smaller block, a /28, does not hold enough.
How do I work this out myself?
Find the smallest power of two, minus two, that is at least 25. That takes 5 host bits, which leaves a /27 prefix. See how to calculate a subnet mask for the full method.