What CIDR notation means
An address like 192.168.1.10/24 pairs a 32-bit IPv4 address
with a prefix length — the number of leading bits that identify the
network. The remaining bits identify hosts within it. A /24 fixes the first
24 bits (three octets) as the network, leaving 8 bits — 256 addresses, 254
of them usable — for hosts.
The five numbers that fall out of it
- Network address — host bits all zero; names the subnet itself.
- Broadcast address — host bits all one; reaches every host at once.
- First / last host — the usable range between them.
- Subnet mask — the prefix written as dotted decimal (/24 = 255.255.255.0).
- Wildcard mask — the mask inverted, used by ACLs and OSPF.
The two addresses you lose (network and broadcast) are why a /24 gives 254 usable hosts, not 256.
Prefix cheat sheet
| Prefix | Mask | Addresses | Usable hosts |
|---|---|---|---|
| /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 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 (point-to-point) |
Private address ranges (RFC 1918)
These never appear on the public internet: 10.0.0.0/8,
172.16.0.0/12, and 192.168.0.0/16. The calculator
flags which one an address belongs to, plus loopback (127/8) and link-local
(169.254/16).
Frequently asked questions
- Why does /30 give only 2 usable hosts?
- Four addresses, minus the network and broadcast, leaves two — exactly enough for a point-to-point link between two routers, which is its main use.
- What's special about /31?
- RFC 3021 allows /31 on point-to-point links with no network or broadcast address, so both addresses are usable — a way to save address space on router-to-router links.
- Can I type the mask instead of the prefix?
- Yes — put a dotted mask like
255.255.255.192in the prefix field, or append/26right onto the address. Either works. - What about IPv6?
- This calculator is IPv4. IPv6 uses the same prefix idea but 128-bit addresses and hexadecimal notation — a separate tool.