Subnet Calculator
Enter an IPv4 address and a CIDR prefix (/24, /16, etc). The calculator gives you network, broadcast, host range, and binary breakdown.
How subnetting actually works
Every IPv4 address is 32 bits. A subnet mask divides those 32 bits into two parts: the network portion (left side, fixed within the subnet) and the host portion (right side, varies per device). CIDR notation is shorthand for "how many of those bits are network."
The math, demystified
Take 192.168.1.50/24. The /24 says the first 24 bits are network — that's the first three octets, 192.168.1. The last 8 bits (.50) identify the specific host on that subnet.
Two specific addresses in every subnet are reserved:
- Network address — all host bits are 0 (e.g.
192.168.1.0). This identifies the subnet itself; you can't assign it to a device. - Broadcast address — all host bits are 1 (e.g.
192.168.1.255). Sending here reaches every host on the subnet.
Everything in between is usable for hosts. So a /24 has 256 total addresses but only 254 usable host addresses.
Common subnet sizes you'll actually see
| CIDR | Mask | Total | Hosts | Typical use |
|---|---|---|---|---|
| /30 | 255.255.255.252 | 4 | 2 | Point-to-point router links |
| /29 | 255.255.255.248 | 8 | 6 | Small server VLAN |
| /28 | 255.255.255.240 | 16 | 14 | Office floor |
| /27 | 255.255.255.224 | 32 | 30 | Mid-size department |
| /24 | 255.255.255.0 | 256 | 254 | Standard home/small office |
| /16 | 255.255.0.0 | 65,536 | 65,534 | Large enterprise |
Modern routers allow both addresses in a /31 to be assigned for point-to-point links — useful when you're trying not to waste IPs on inter-router connections. The calculator handles this case.
