Toolman

Subnet mask to CIDR

The CIDR reference on this site is keyed by prefix length, which is the wrong way round when what you have in front of you is a mask. This is the same 33 networks, keyed by the mask.

Converting between the two needs no arithmetic: the prefix is the number of one-bits in the mask. 255.255.255.0 is twenty-four ones and eight zeros, so it is /24.

Subnet maskCIDRAddressesUsableWildcard
0.0.0.0/04,294,967,2964,294,967,294255.255.255.255
128.0.0.0/12,147,483,6482,147,483,646127.255.255.255
192.0.0.0/21,073,741,8241,073,741,82263.255.255.255
224.0.0.0/3536,870,912536,870,91031.255.255.255
240.0.0.0/4268,435,456268,435,45415.255.255.255
248.0.0.0/5134,217,728134,217,7267.255.255.255
252.0.0.0/667,108,86467,108,8623.255.255.255
254.0.0.0/733,554,43233,554,4301.255.255.255
255.0.0.0/816,777,21616,777,2140.255.255.255
255.128.0.0/98,388,6088,388,6060.127.255.255
255.192.0.0/104,194,3044,194,3020.63.255.255
255.224.0.0/112,097,1522,097,1500.31.255.255
255.240.0.0/121,048,5761,048,5740.15.255.255
255.248.0.0/13524,288524,2860.7.255.255
255.252.0.0/14262,144262,1420.3.255.255
255.254.0.0/15131,072131,0700.1.255.255
255.255.0.0/1665,53665,5340.0.255.255
255.255.128.0/1732,76832,7660.0.127.255
255.255.192.0/1816,38416,3820.0.63.255
255.255.224.0/198,1928,1900.0.31.255
255.255.240.0/204,0964,0940.0.15.255
255.255.248.0/212,0482,0460.0.7.255
255.255.252.0/221,0241,0220.0.3.255
255.255.254.0/235125100.0.1.255
255.255.255.0/242562540.0.0.255
255.255.255.128/251281260.0.0.127
255.255.255.192/2664620.0.0.63
255.255.255.224/2732300.0.0.31
255.255.255.240/2816140.0.0.15
255.255.255.248/29860.0.0.7
255.255.255.252/30420.0.0.3
255.255.255.254/31220.0.0.1
255.255.255.255/32110.0.0.0

CIDR reference by prefix · Port numbers