How this calculator works
Enter ipv4 address, cidr prefix length. Select Calculate to apply the displayed formula and review the labeled results.
Formula / method
Addresses = 2^(32 − prefix); network = address AND subnet mask
Worked example
192.168.1.42/24 belongs to network 192.168.1.0 with broadcast address 192.168.1.255.
Assumptions and limitations
The input is a dotted-decimal IPv4 address and the prefix is an integer from 0 through 32.
Usable-host conventions differ for /31 point-to-point and /32 host routes; IPv6 is not included.