Subnet / CIDR calculator
Enter an IPv4 address with a CIDR prefix (e.g. 10.0.0.0/24) to get the network, broadcast, usable host range, and host count.
How to use the subnet / cidr calculator
- Enter an IPv4 address with a CIDR prefix, e.g. 10.0.0.0/24.
- Press Calculate.
- Read the network, broadcast, host range, and host count.
Reading the results
The CIDR prefix (e.g. /24) says how many leading bits identify the network; the rest address hosts. The network address is the first in the range and the broadcast is the last — neither is assignable to a device, which is why a /24 has 256 total addresses but 254 usable. Calculated entirely in your browser.
Code & API examples
Use this from the command line or your code.
Shell (ipcalc)
ipcalc 10.0.0.0/24
Python
import ipaddress
n = ipaddress.ip_network('10.0.0.0/24')
print(n.network_address, n.broadcast_address, n.num_addresses)
See all endpoints at /api/tools/.
Frequently asked questions
The /24 is the CIDR prefix — it says the first 24 bits are the network portion, leaving 8 bits (254 usable addresses) for hosts.
The network address is the first address in the range (identifies the subnet); the broadcast address is the last (used to reach every host at once). Neither is assignable to a device.
Related tools
Want to hide your IP for real?
vpn.golf is a no-logs WireGuard VPN. Pick a hole, take the shot.
Step up to the tee — free