Back to Developers
Parameters
Results
- Hosts
- 254
How it works
Calculate the number of usable host addresses in an IPv4 subnet from a CIDR prefix.
Who it's for: Network administrators and IT students planning IP address allocation.
Formula: hosts = 2^(32 − CIDR) − 2, subtracting network and broadcast addresses.
Works for standard /8 through /32 prefixes.
Uses binary (1024-based) addressing conventions.
How to use
- Enter CIDR prefix length from 1 to 32 (e.g., 24 for a /24 subnet).
- Read Hosts for the number of assignable device addresses.
Good to know
- /31 and /32 are special cases for point-to-point links — this calculator subtracts 2 addresses as usual.
Related tools
More calculators in the same category
- IPv4 RangeNetwork, broadcast, and hosts from CIDR
- JSON FormatterFormat, minify, and validate JSON in your browser
- JWT DecoderDecode JWT tokens locally — nothing is sent to a server
- Base64 Encode/DecodeEncode and decode text with Base64
- Cron Expression BuilderBuild and explain cron schedules
- UUID GeneratorGenerate cryptographically random UUID v4 values