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.
CIDR (Classless Inter-Domain Routing) writes a network as an address plus a prefix length, like 10.0.0.0/24. The prefix says how many leading bits are fixed as the network, replacing the old class A/B/C system.
A /26 leaves 6 host bits, giving 64 total addresses and 62 usable ones after subtracting the network and broadcast addresses.
Take 32 minus the prefix to get the host bits, raise 2 to that power for total addresses, then subtract 2 for the network and broadcast addresses (e.g. /28 gives 2^4 = 16 minus 2 = 14 usable).
A subnet mask like 255.255.255.0 marks the network bits with 1s; it's just another way to write the prefix. 255.255.255.0 equals /24 — both say the first 24 bits are the network.
The first address identifies the network itself and the last is the broadcast address, so neither can be assigned to a host. That's why a /24 has 256 addresses but only 254 are usable.
A /30 gives 4 addresses with 2 usable, ideal for point-to-point links. A /31 (2 addresses, both usable) is allowed for point-to-point per RFC 3021, and /32 designates a single host.
Borrow host bits by increasing the prefix: a /24 becomes two /25s, four /26s, and so on. Each added bit halves the host count while doubling the number of subnets.
RFC 1918 reserves 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 for internal use. They're not routable on the public internet, so devices behind them share a public IP via NAT.
No. It runs entirely in your browser, so the addresses you enter never reach a server. That fits vpn.golf's no-logs approach — nothing to record because nothing leaves your device.
WireGuard often assigns each device a single tunnel address as a /32 (or /128 for IPv6) so traffic is routed to exactly one peer. It pins one address per device rather than a whole subnet.
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