What a CIDR prefix is actually telling you
Every IPv4 address is 32 bits, split into a network portion and a host portion. The CIDR prefix — the number after the slash — says how many of those 32 bits belong to the network, leaving the rest for individual hosts. A /24 means the first 24 bits are fixed (the network), leaving 8 bits free for host addresses — 2⁸ = 256 possible values, most of them usable.
| CIDR | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /30 | 255.255.255.252 | 4 | 2 |
Usable hosts is always total addresses minus 2 — one address is reserved to identify the network itself, and the highest address in the range is reserved as the broadcast address. (A /31 is a documented exception used for point-to-point links, and a /32 identifies a single host — both edge cases most subnetting tools, including this one, treat separately from the general formula.)
Network address, broadcast address, and host range worked out
Take 192.168.1.100/24 as an example. The /24 mask fixes the first three octets and leaves the last one free:
- Network address (all host bits set to 0): 192.168.1.0
- Broadcast address (all host bits set to 1): 192.168.1.255
- Usable host range: 192.168.1.1 through 192.168.1.254
Every device you configure with an address ending anywhere from .1 to .254 belongs to that same /24 network and can reach each other directly, without needing a router in between.
Sizing a subnet to fit the hosts you actually need
Rather than picking a CIDR prefix and hoping it's big enough, it's usually more efficient to start from how many devices need addresses and work backward. The rule: find the smallest power of 2 that's at least your host count plus 2.
Need addresses for 50 devices? 2⁶ = 64 is the smallest power of 2 that clears 52 (50 + 2), which corresponds to a /26 network — 64 total addresses, 62 usable. Asking for exactly 50 would round up to the same /26, since subnet sizes only come in powers of two; there's no such thing as a network sized for exactly 50 hosts.
Private address ranges (RFC 1918)
| Range | CIDR | Typical use |
|---|---|---|
| 10.0.0.0 – 10.255.255.255 | 10.0.0.0/8 | Large corporate networks |
| 172.16.0.0 – 172.31.255.255 | 172.16.0.0/12 | Medium networks, Docker defaults |
| 192.168.0.0 – 192.168.255.255 | 192.168.0.0/16 | Home routers, small offices |
These ranges are set aside for internal networks and never routed on the public internet, which is why nearly every home router hands out addresses starting with 192.168 by default — and why two completely unrelated networks can both use the exact same private addresses without conflict, as long as they never connect directly.
Related tools
If you're planning network capacity alongside addressing — how much bandwidth a given number of devices will need — the Bandwidth Calculator covers that side of network planning.