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
Prefix = 32 − ⌈log₂(hosts + 2)⌉
- + 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.
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.
Last reviewed on 3 October 2026. Found a mistake? Tell us.

