This is handy cheat sheet for calculating the size you will need for a subnet and to convert from CIDR to Netmask format.
The number of Avaliable Address is always the number (Total Addresses – 2 ), one address is broadcast and the other is the network address
CIDR | Total Addresses | Netmask |
/30 | 4 | 255.255.255.252 |
/29 | 8 | 255.255.255.248 |
/28 | 16 | 255.255.255.240 |
/27 | 32 | 255.255.255.224 |
/26 | 64 | 255.255.255.192 |
/25 | 128 | 255.255.255.128 |
/24 | 256 | 255.255.255.0 |
/23 | 512 | 255.255.254.0 |
/22 | 1K | 255.255.252.0 |
/21 | 2K | 255.255.248.0 |
/20 | 4K | 255.255.240.0 |
/19 | 8K | 255.255.224.0 |
/18 | 16K | 255.255.192.0 |
/17 | 32K | 255.255.128.0 |
/16 | 64K | 255.255.0.0 |
/15 | 128K | 255.254.0.0 |
/14 | 256K | 255.252.0.0 |
/13 | 512K | 255.248.0.0 |
/12 | 1024K | 255.240.0.0 |
/11 | 2048 K | 255.224.0.0 |
/10 | 4096 K | 255.192.0.0 |
/9 | 8192 K | 255.128.0.0 |
/8 | 16384 K | 255.0.0.0 |
Bonus: List of Local IPv4 Addresses
Start | End | Netmask | CIDR | Total Addresses |
10.0.0.0 | 10.255.255.255 | 255.0.0.0 | /8 | 16384 K |
172.16.0.0 | 172.31.255.255 | 255.240.0.0 | /12 | 1024 K |
192.168.0.0 | 192.168.255 | 255.255.0.0 | /16 | 16384 K |
Sources:
https://www.aelius.com/njh/subnet_sheet.html
https://www.ietf.org/rfc/rfc1878.txt
https://www.ietf.org/rfc/rfc1918.txt
http://gestioip.net/cgi-bin/subnet_calculator.cgi