Subnet Hosts Calculator
Find the number of usable hosts, network and broadcast address for a subnet from its CIDR or mask free in your browser with this subnet calculator.
Enter Values
Before you rely on this: First-pass guide only. Verify safety-critical or regulated work against the relevant standards, your project requirements and a qualified professional.
How to use this calculator
- Enter the CIDR prefix.
- Press Calculate.
How it works
From the prefix it works out the addresses in the block (2^(32 − prefix)) and the usable hosts (two fewer, for the network and broadcast addresses).
Worked example
/24. 256 addresses, 254 usable hosts.
Common mistakes
- Forgetting to subtract 2 for the network and broadcast addresses on IPv4 subnets.
- Confusing total addresses with usable hosts — a /24 has 256 addresses but 254 usable hosts.
Frequently asked questions
How many hosts are in a subnet?
Usable hosts = 2^(32 − prefix) − 2 for IPv4. A /24 gives 254, a /26 gives 62, after removing the network and broadcast addresses.
Why subtract two addresses?
The first address identifies the network and the last is the broadcast address, so neither can be assigned to a host.
Why are there two fewer usable hosts?
The first address is the network ID and the last is the broadcast address, so neither can be assigned to a device.
Related tools
- IP Range Calculator
- Subnet Mask Calculator
- Download Time Calculator
- Mbps to MB/s Calculator
- Bandwidth Calculator
- Data Usage Calculator
Explore more in Networking, IT & Sysadmin.
Cite this tool
Zerdly. (2026). Subnet Hosts Calculator. Retrieved from https://www.zerdly.com/tools/subnet-hosts-calculator/
Tip: Enter any known values to calculate the remaining results.
All calculations run in your browser. Your inputs are never saved or transmitted.



