Number of Usable IP Addresses Calculator
Find how many usable hosts an IPv4 prefix allows, or the smallest prefix that fits a number of hosts.
Also searched as: hosts per subnet · what prefix do I need · how many IPs in a /24
Your inputs
Results
Usable host addresses
254
- Total addresses
- 256
- Subnet mask
- 255.255.255.0
- How many fit in a /24
- 1
✓Exact calculation — rounded only for display
Notes for this result
- Network and broadcast addresses are excluded except for /31 (RFC 3021 point-to-point) and /32 (single host).
What if?
Pick an input and drag the slider to see how the result changes.
What this calculator does
Size subnets for a planned number of devices, or check how many hosts a given prefix length can address, including the special cases of /31 and /32.
Formula and method
Worked example
Calculated by this tool with its default inputs:
Inputs
- Calculate: Usable hosts for a prefix
- Prefix length: 24
Results
- Usable host addresses: 254
- Total addresses: 256
- Subnet mask: 255.255.255.0
- How many fit in a /24: 1
How to read the results
Leave room for growth when choosing a prefix.
Assumptions and limitations
- Calculated entirely in your browser — addresses and values are never sent to a server.
Questions
How many hosts in a /24?
254 usable of 256 addresses.
Methodology and verification
- Result type
- Exact mathematical calculation (rounded only for display)
- Formula version
- 1.0
- Automated verification
- 4 reference and validation test cases, checked against independently computed values. The site cannot be built if any of them fail.
Privacy
Everything you enter is calculated in this browser and is not sent to Numerith or anyone else. Inputs are added to a share link only if you choose to include them. Privacy policy