IP Subnet Calculator (CIDR)
Enter an IP and a CIDR prefix (e.g. 192.168.1.10/24) and get the network address, mask, broadcast, and usable host range.
What CIDR notation is
The number after the slash (/24, /30...) indicates how many of an IPv4 address's 32 bits belong to the network — the rest identify each host within that network. The larger the prefix, the smaller the subnet and the fewer hosts it supports.
| Prefix | Mask | Total addresses | Usable hosts |
|---|---|---|---|
| /24 | 255.255.255.0 | 256 | 254 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 0 (point-to-point link) |
Why 2 addresses are subtracted from usable hosts
The first address in any subnet is the network address (identifies the subnet itself, not any host) and the last is the broadcast address (sends to every host in the subnet at once) — neither can be assigned to an individual host, except in the special /31 and /32 cases.