/18 vs /20 — Subnet Comparison

A /18 subnet is larger than a /20. Every additional bit in the prefix halves the address space — the 2-bit difference between these two means /18 has 22 = 4 times as many addresses.

/18

16K IPs — quarter of a /16

Full reference →
Total IPs 16,384
Usable Hosts 16,382
Subnet Mask 255.255.192.0
Wildcard Mask 0.0.63.255

Typical Uses

  • VPC tier segmentation
  • Large-office building network
/20

4K IPs — AWS default subnet size

Full reference →
Total IPs 4,096
Usable Hosts 4,094
Subnet Mask 255.255.240.0
Wildcard Mask 0.0.15.255

Typical Uses

  • AWS default subnet (per AZ)
  • Medium-large application tier subnet
  • Office floor VLAN

Key Differences

more IPs in /18 than /20
4
/20 subnets fit inside one /18
2
bits of difference in prefix length

How 4 /20 Subnets Divide a /18

Example using 10.0.0.0/18 as the parent block.

# CIDR Network First Usable Last Usable Broadcast Hosts
1 10.0.0.0/20 10.0.0.0 10.0.0.1 10.0.15.254 10.0.15.255 4,094
2 10.0.16.0/20 10.0.16.0 10.0.16.1 10.0.31.254 10.0.31.255 4,094
3 10.0.32.0/20 10.0.32.0 10.0.32.1 10.0.47.254 10.0.47.255 4,094
4 10.0.48.0/20 10.0.48.0 10.0.48.1 10.0.63.254 10.0.63.255 4,094

FAQ

What is the difference between /18 and /20?

A /18 has 16,382 usable hosts and a /20 has 4,094. The subnet masks differ: /18 uses 255.255.192.0 while /20 uses 255.255.240.0. Every additional bit in the prefix halves the number of addresses — so the 2-bit gap means /18 is exactly 4× larger.

How many /20 subnets fit in a /18?

Exactly 4 /20 subnets fit perfectly inside one /18 with no wasted space. To split a /18 into /20s, just increment the last 2 bits of the network address for each new subnet.

Which should I choose?

/18 is typically used for: VPC segment. /20 is better for: AWS default subnet, medium office VLAN. Choose the smallest prefix that comfortably fits your host count — over-allocating wastes address space, but under-allocating means painful renumbering later.

Related Comparisons