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.
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 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
Usable = 2^(32 − p) − 2 for p ≤ 30; 2 for /31; 1 for /32
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.
- Editorial review
- Awaiting human editorial review. The explanation was drafted with AI assistance; the formula and examples are verified by the automated tests above.
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