Subnet Calculator
Hosts, mask and ranges for a CIDR block.
Enter your values
Results update instantly as you type — no submit needed.
Results
- Usable hosts
- 254
- Subnet mask
- 255.255.255.0
- Total addresses
- 256
- Prefix for hosts needed
- /24
Quick answer
A CIDR prefix defines how many bits are network bits, which sets the host count.
Usable hosts = 2^(32 − prefix) − 2
How to use the Subnet Calculator
- 1Enter the CIDR prefix length.
- 2Enter how many hosts you need.
- 3Use the suggested prefix if the current one is too small.
Frequently asked questions
Why subtract two hosts?
The network and broadcast addresses are not assignable.
What is a /24?
256 addresses, 254 usable — the classic small office subnet.