IT & Digital
IPv4 Subnet Usable Hosts
Count conventional host addresses in an IPv4 subnet.
Let’s calculate.
Usage estimateCount conventional host addresses in an IPv4 subnet.
Formula and worked example
Conventional usable hosts = 2^(32 − prefix) − 2
Reference example
A /24 has 256 addresses and 254 conventional usable host addresses.
When this calculation applies
This conventional network/broadcast subtraction applies only to prefixes /0 through /30. /31 point-to-point links and /32 host routes have different semantics and are intentionally rejected. The count does not imply public routability.
Background reference: rfc-editor.org. References explain the method or units; they do not certify this calculator.
Source scope: RFC 3021 explains why /31 point-to-point addressing is an exception to conventional network/broadcast subtraction. CalcuAll intentionally limits this count to /0–/30; address availability is not a routing or security guarantee.
For the derivation, input conventions and numerical limits, open .