Calculate the network address, broadcast address, and usable host range for an IPv4 address and subnet mask.
A CIDR prefix like /24 tells you how many of the 32 bits in an IPv4 address are fixed as the network portion — the rest identify individual hosts within that network. A /24 fixes the first 24 bits (the first three octets), leaving 8 bits for host addresses, which is why /24 is the common "255.255.255.0" home and small-office network size.
Within any subnet, the very first address is reserved as the network address (identifying the subnet itself) and the very last is reserved as the broadcast address (used to reach every device on that subnet at once). Every address between those two endpoints is usable for an actual device — which is why usable hosts is always 2 less than the total addresses in the block.
| CIDR | Subnet mask | Usable hosts |
|---|---|---|
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /28 | 255.255.255.240 | 14 |
| /30 | 255.255.255.252 | 2 |
This calculator covers standard IPv4 subnetting and doesn't account for special-purpose ranges or IPv6.