Find the subnet for an IPv4 address
If you know only a device’s IPv4 address and prefix length, you can find the start of its network and the usable host range. Enter the address, then a slash and the prefix length.
Example: Find the range that contains 10.24.8.70/28
Enter 10.24.8.70/28 and select Calculate CIDR:
- Network
10.24.8.64/28- Subnet mask
255.255.255.240- Broadcast
10.24.8.79- Usable range
10.24.8.65through10.24.8.78- Address counts
- 16 total, 14 usable
The input address is a host within this range. In a typical subnet, the first address is reserved for the network and the last for broadcast, so neither counts as a usable host. A /31 is a point-to-point link with two usable addresses. A /32 is a single host. Neither has a broadcast address in the result.
When input is rejected or you need an unassigned address
Leading zeros in the address are rejected, as in 10.24.008.70/28. Use four numbers separated by dots, each from 0 to 255, followed by a slash and a prefix length from 0 to 32. Dotted subnet masks are not accepted as input.
“Usable” means an address can be used as a host according to the calculation. The tool does not check assignments, cloud provider reservations, or whether a host is reachable.
Calculate an IPv6 range
2001:db8::42/64 gives the network 2001:db8::/64 with 18,446,744,073,709,551,616 addresses. Use a prefix from 0 to 128. The range includes both endpoints. IPv6 results do not show a broadcast address or an IPv4-style usable host count.