Subnet Mask Cheat Sheet (CIDR /0 to /32)

A CIDR prefix such as /24 says how many leading bits of the address are the network. The table shows each prefix as a dotted mask, in binary, as a wildcard mask and with its number of usable hosts.

IPv4 addresses
Binary
Result appears here as you type

IPv4 CIDR prefixes and subnet masks

IPv4 CIDR prefixes and subnet masks
CIDRSubnet maskBinary maskWildcardUsable hosts
/00.0.0.000000000.00000000.00000000.00000000255.255.255.2554,294,967,294
/1128.0.0.010000000.00000000.00000000.00000000127.255.255.2552,147,483,646
/2192.0.0.011000000.00000000.00000000.0000000063.255.255.2551,073,741,822
/3224.0.0.011100000.00000000.00000000.0000000031.255.255.255536,870,910
/4240.0.0.011110000.00000000.00000000.0000000015.255.255.255268,435,454
/5248.0.0.011111000.00000000.00000000.000000007.255.255.255134,217,726
/6252.0.0.011111100.00000000.00000000.000000003.255.255.25567,108,862
/7254.0.0.011111110.00000000.00000000.000000001.255.255.25533,554,430
/8255.0.0.011111111.00000000.00000000.000000000.255.255.25516,777,214
/9255.128.0.011111111.10000000.00000000.000000000.127.255.2558,388,606
/10255.192.0.011111111.11000000.00000000.000000000.63.255.2554,194,302
/11255.224.0.011111111.11100000.00000000.000000000.31.255.2552,097,150
/12255.240.0.011111111.11110000.00000000.000000000.15.255.2551,048,574
/13255.248.0.011111111.11111000.00000000.000000000.7.255.255524,286
/14255.252.0.011111111.11111100.00000000.000000000.3.255.255262,142
/15255.254.0.011111111.11111110.00000000.000000000.1.255.255131,070
/16255.255.0.011111111.11111111.00000000.000000000.0.255.25565,534
/17255.255.128.011111111.11111111.10000000.000000000.0.127.25532,766
/18255.255.192.011111111.11111111.11000000.000000000.0.63.25516,382
/19255.255.224.011111111.11111111.11100000.000000000.0.31.2558,190
/20255.255.240.011111111.11111111.11110000.000000000.0.15.2554,094
/21255.255.248.011111111.11111111.11111000.000000000.0.7.2552,046
/22255.255.252.011111111.11111111.11111100.000000000.0.3.2551,022
/23255.255.254.011111111.11111111.11111110.000000000.0.1.255510
/24255.255.255.011111111.11111111.11111111.000000000.0.0.255254
/25255.255.255.12811111111.11111111.11111111.100000000.0.0.127126
/26255.255.255.19211111111.11111111.11111111.110000000.0.0.6362
/27255.255.255.22411111111.11111111.11111111.111000000.0.0.3130
/28255.255.255.24011111111.11111111.11111111.111100000.0.0.1514
/29255.255.255.24811111111.11111111.11111111.111110000.0.0.76
/30255.255.255.25211111111.11111111.11111111.111111000.0.0.32
/31255.255.255.25411111111.11111111.11111111.111111100.0.0.12
/32255.255.255.25511111111.11111111.11111111.111111110.0.0.01

Frequently asked questions

How many hosts are in a /24 network?+

A /24 (255.255.255.0) has 256 addresses, of which 254 are usable because the network and broadcast addresses are reserved.

Why does /31 have 2 usable hosts?+

RFC 3021 allows /31 networks on point-to-point links, where both addresses are usable because no broadcast address is needed.

Full IP to Binary ConverterAll IP Address Tools