Home Net Guide

Home / Subnet calculator / /20

/20 subnet: mask 255.255.240.0

A /20 network holds 4,096 addresses, of which 4,094 can be given to devices. Its subnet mask is 255.255.240.0.

Prefix length (CIDR)
/20
Subnet mask
255.255.240.0
Wildcard mask
0.0.15.255
Mask in binary
11111111.11111111.11110000.00000000
Network bits / host bits
20 / 12
Total addresses
4,096 (2 to the power of 12)
Usable host addresses
4,094 (the first address names the network and the last is the broadcast address)
Contains
16 networks of size /24

What a /20 is used for

A /20 is 16 /24 networks, 4,094 usable addresses. It is a familiar size in the cloud: the default VPC that Amazon Web Services creates gives each availability zone a /20 subnet.

Worked example: which /20 is 172.16.77.130 in?

The mask's value in the third octet is 240, so networks advance in steps of 256 minus 240, which is 16, in that octet: 0, 16, 32, 48 and so on up to 240. The third octet of 172.16.77.130 is 77, which falls in the step that starts at 64. The network is therefore 172.16.64.0/20.

Network
172.16.64.0/20
Usable range
172.16.64.1 to 172.16.79.254
Broadcast address
172.16.79.255
Next /20 begins at
172.16.80.0/20

Open this example in the subnet calculator to see it bit by bit, or to try your own address.

All 16 /20 networks in 172.16.0.0/16

NetworkUsable rangeBroadcast
172.16.0.0/20172.16.0.1 to 172.16.15.254172.16.15.255
172.16.16.0/20172.16.16.1 to 172.16.31.254172.16.31.255
172.16.32.0/20172.16.32.1 to 172.16.47.254172.16.47.255
172.16.48.0/20172.16.48.1 to 172.16.63.254172.16.63.255
172.16.64.0/20172.16.64.1 to 172.16.79.254172.16.79.255
172.16.80.0/20172.16.80.1 to 172.16.95.254172.16.95.255
172.16.96.0/20172.16.96.1 to 172.16.111.254172.16.111.255
172.16.112.0/20172.16.112.1 to 172.16.127.254172.16.127.255
172.16.128.0/20172.16.128.1 to 172.16.143.254172.16.143.255
172.16.144.0/20172.16.144.1 to 172.16.159.254172.16.159.255
172.16.160.0/20172.16.160.1 to 172.16.175.254172.16.175.255
172.16.176.0/20172.16.176.1 to 172.16.191.254172.16.191.255
172.16.192.0/20172.16.192.1 to 172.16.207.254172.16.207.255
172.16.208.0/20172.16.208.1 to 172.16.223.254172.16.223.255
172.16.224.0/20172.16.224.1 to 172.16.239.254172.16.239.255
172.16.240.0/20172.16.240.1 to 172.16.255.254172.16.255.255

One size up and one size down

Each bit removed from the prefix doubles a network, and each bit added halves it. A /19 is twice the size, with 8,190 usable addresses, and a /21 is half the size, with 2,046 usable addresses. The table of every prefix size compares them all, and the VLAN planner lays out several networks of different sizes without overlaps.