Subnet Hosts Calculator
Calculate the number of usable IPv4 host addresses for a given subnet prefix length.
Examples
- /24 ⇒ 254 hosts
- /30 ⇒ 2 hosts
FAQ
What is a CIDR prefix?
It's the number of bits set to 1 in the subnet mask.
Why subtract 2 hosts?
Network and broadcast addresses are not usable.
Can prefixes be 31 or 32?
Yes, but they allow at most 0 or 1 usable host.
Does this work for IPv6?
No, this formula is specific to IPv4.
Additional Information
No additional information available.