You can use this chart to quickly figure out netmasks, CIDR notation, and how many bits were borrowed from the host octet. The top is the bit borrowed (with CIDR notation in paranthesis), along the side is what the borrowed bits add up to, and in the centre is how many bits were borrowed (with availabe hosts in parenthesis).
128 (/25) | 64 (/26) | 32 (/27) | 16 (/28) | 8 (/29) | 4 (/30) | 2 (/31) | 1 (/32) | |
128 | 1 (126) | |||||||
192 | 2 (62) | |||||||
224 | 3 (30) | |||||||
240 | 4 (14) | |||||||
248 | 5 (6) | |||||||
252 | 6 (2) | |||||||
254 | 7 (N/A) | |||||||
255 | 8 (N/A) |