About this calculator
It also shows how many blocks of that size fit in a /24.
How to use it
- Choose what to find.
- Enter the hosts needed, or the prefix.
- Read the result.
The formula
- + 2
- network and broadcast addresses
Worked example
50 hosts
- 50 + 2 = 52 needs 6 host bits (64 addresses).
- Prefix /26, mask 255.255.255.192, 62 usable hosts; four fit in a /24.
What the result means
Leave room for growth when sizing subnets.
CIDR prefix reference, /8 to /32
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 1,67,77,216 | 1,67,77,214 |
| /12 | 255.240.0.0 | 10,48,576 | 10,48,574 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point link) |
| /32 | 255.255.255.255 | 1 | 1 (single host) |
Example: splitting one /24 for an office
Say an office has 192.168.5.0/24 and needs four networks: staff Wi-Fi for 100 devices, accounts for 50, CCTV for 20 and management for 10. The calculator gives /25 (126 usable), /26 (62), /27 (30) and /28 (14).
Allocate the largest block first so every block starts on a boundary that is a multiple of its size: staff 192.168.5.0/25, accounts 192.168.5.128/26, CCTV 192.168.5.192/27 and management 192.168.5.224/28. That uses 240 of the 256 addresses and leaves 192.168.5.240/28 spare.
Sizing mistakes to avoid
- Forgetting the two reserved addresses. 62 hosts fit a /26 exactly, but 63 hosts need a /25.
- Sizing with no headroom. A subnet that is full on day one has to be renumbered later, which is far more work than starting one size up.
- Ignoring cloud reservations. AWS and Azure each reserve 5 addresses in every subnet, so a cloud /28 gives 11 usable addresses, not 14.
Assumptions
- IPv4.
Limitations
- Cloud providers reserve extra addresses in each subnet.
Frequently asked questions
What mask is /26?
255.255.255.192.
How many hosts in a /26?
62 usable.
What prefix for 100 hosts?
/25, with 126 usable.
What prefix do I need for 500 hosts?
/23. It has 512 addresses and 510 usable hosts, with mask 255.255.254.0.
How many /27 subnets fit in a /24?
8. Each /27 has 32 addresses, and 256 ÷ 32 = 8.
What does /32 mean?
A block of exactly one address. It is used for a single host, such as in a firewall rule or a route to one server.
Last reviewed on 12 October 2026. How we calculate and check. Found a mistake? Tell us.

