Skip to content
Mailwel
Theme

Netmask to CIDR

Type a netmask, a prefix length or a wildcard mask to get the other two, plus how many addresses and hosts it covers.

Like 255.255.240.0, /20, 20 or 0.0.15.255.

Try:

/20

read as a netmask

Example: type your own mask above.

Prefix/20
Netmask255.255.240.0
Wildcard mask0.0.15.255
Netmask in binary
11111111.11111111.11110000.00000000
Netmask in hex
0xFFFFF000
Addresses
4,096
Usable hosts
4,094

Common masks

PrefixNetmaskWildcardAddressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/16255.255.0.00.0.255.25565,53665,534
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011

All 33 are in the subnet cheat sheet.