Convert a CIDR prefix into a subnet mask, address count and usable host range.
What this calculator does
CIDR notation writes a network as an address followed by a prefix length โ the number of leading bits that identify the network rather than the host. A /24 fixes the first 24 bits, leaving 8 bits and therefore 254 usable addresses.
The network address and broadcast address are reserved at each end of the range, which is why usable hosts are always two fewer than the total. A /31 is the exception, used for point-to-point links.
How to use it
- Enter an IP address from the network.
- Enter the prefix length or choose a subnet mask.
- Read the network, broadcast and usable host range.
How the number is calculated
Worked example
As an example, with a IP address of 192.168.1.10, CIDR prefix of 24, the calculator returns a network of 192.168.1.0/24. Underneath, Netmask comes out at 255.255.255.0 and Broadcast at 192.168.1.255. Change any field and every figure updates as you type.