~/netref / Subnet Mask Table
##

Subnet Mask & Wildcard Quick Map

The single-octet values you memorize. A mask octet of 224 means 3 bits borrowed; its wildcard is 31.

BitsMask octetMask binaryWildcardWild binaryBlock size
/000000000025511111111256
/11281000000012701111111128
/219211000000630011111164
/322411100000310001111132
/424011110000150000111116
/5248111110007000001118
/6252111111003000000114
/7254111111101000000012
/8255111111110000000001
Bits = how many of the 8 octet bits are network bits (added on top of the previous /8 boundary).

// binary place values — read any octet in your head

128
2⁷
64
2⁶
32
2⁵
16
2⁴
8
4
2
1
2⁰
Add the values left-to-right for each 1 bit. 11100000 = 128+64+32 = 224 · the first 0 marks where the wildcard starts.

// hosts per prefix — powers of two (−2 for network & broadcast)

CIDRBlock (2ⁿ)Usable hostsFormula
/30422² − 2
/29862³ − 2
/2816142⁴ − 2
/2732302⁵ − 2
/2664622⁶ − 2
/251281262⁷ − 2
/242562542⁸ − 2
/235125102⁹ − 2
/221,0241,0222¹⁰ − 2
/1665,53665,5342¹⁶ − 2