Netmasks Overview
| # Bits | # Hosts | Netmask | Cisco Mask | Notes | |
|---|---|---|---|---|---|
| /4 | 268435456 | 240.0.0.0 | 15.255.255.255 | ||
| /5 | 134217728 | 248.0.0.0 | 7.255.255.255 | ||
| /6 | 67108864 | 252.0.0.0 | 3.255.255.255 | ||
| /7 | 33554432 | 254.0.0.0 | 1.255.255.255 | ||
| /8 | 16777216 | 255.0.0.0 | 0.255.255.255 | class A network | |
| /9 | 8388608 | 255.128.0.0 | 0.127.255.255 | ||
| /10 | 4194304 | 255.192.0.0 | 0.63.255.255 | ||
| /11 | 2097152 | 255.224.0.0 | 0.31.255.255 | ||
| /12 | 1048576 | 255.240.0.0 | 0.15.255.255 | ||
| /13 | 524288 | 255.248.0.0 | 0.7.255.255 | ||
| /14 | 262144 | 255.252.0.0 | 0.3.255.255 | ||
| /15 | 131072 | 255.254.0.0 | 0.1.255.255 | ||
| /16 | 65536 | 255.255.0.0 | 0.0.255.255 | class B network | |
| /17 | 32768 | 255.255.128.0 | 0.0.127.255 | ||
| /18 | 16384 | 255.255.192.0 | 0.0.63.255 | ||
| /19 | 8192 | 255.255.224.0 | 0.0.31.255 | ||
| /20 | 4096 | 255.255.240.0 | 0.0.15.255 | ||
| /21 | 2048 | 255.255.248.0 | 0.0.7.255 | ||
| /22 | 1024 | 255.255.252.0 | 0.0.3.255 | ||
| /23 | 512 | 255.255.254.0 | 0.0.1.255 | ||
| /24 | 256 | 255.255.255.0 | 0.0.0.255 | class C network | |
| /25 | 128 | 255.255.255.128 | 0.0.0.127 | ||
| /26 | 64 | 255.255.255.192 | 0.0.0.63 | ||
| /27 | 32 | 255.255.255.224 | 0.0.0.31 | ||
| /28 | 16 | 255.255.255.240 | 0.0.0.15 | ||
| /29 | 8 | 255.255.255.248 | 0.0.0.7 | ||
| /30 | 4 | 255.255.255.252 | 0.0.0.3 | ||
| /31 | point to point links only | ||||
| /32 | 1 | 255.255.255.255 | single IP address | use host notation | |
Note:
The number of usable hosts is always two less than the overall number of hosts in the sub-network.
Other nice source: https://www.aelius.com/njh/subnet_sheet.html