Subnet & CIDR calculator
Network, broadcast, host range and mask for any IPv4 CIDR block.
/26
64 addresses total
Used in ACLs and OSPF
11000000.10101000.00000001.1000001011111111.11111111.11111111.1100000011000000.10101000.00000001.10000000Prefix reference
| Prefix | Mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /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 |
How it works
An IPv4 address is 32 bits. CIDR notation splits it with a slash: the prefix says how many leading bits identify the network, and the rest identify the host within it.
192.168.1.130/26
mask = 26 ones then 6 zeros = 255.255.255.192
network = address AND mask = 192.168.1.128
broadcast = network OR ~mask = 192.168.1.191
hosts = 2^(32−26) − 2 = 62 Why two addresses are unusable
The all-zeros host address identifies the network itself, and the all-ones address is the broadcast. Neither can be assigned to a device, which is why a /24 gives 254 usable addresses rather than 256.
The /31 and /32 exceptions
RFC 3021 allows /31 on point-to-point links, where both addresses are usable because there is nobody to broadcast to. A /32 is a single host route, used for loopbacks and specific-host firewall rules.
Reading a prefix quickly
Each bit you take from the host portion halves the number of addresses. /24 is 256, /25 is 128, /26 is 64, /27 is 32. Going the other way, /23 is two /24s, /22 is four. Most subnetting questions are that doubling and halving.
Classes are historical
Class A, B and C were the pre-1993 allocation scheme, replaced by CIDR precisely because fixed class boundaries wasted enormous numbers of addresses. The class is shown above because it still appears in documentation and exams, not because it affects routing.