taap.digitalnetwork engineering toolkit

What subnet mask do I need for 2,000 hosts?

Answer
/21 255.255.248.0 · 2,046 usable

For 2,000 hosts the smallest subnet is a /21 (255.255.248.0): 2,046 usable addresses with 46 spare. If you expect growth, a /20 gives 4,094 hosts.

hosts2mask · adjust the values
Pole with tangled wires against a clear sky
Pole with tangled wires against a clear sky. Photo: Wood Hong / Unsplash

Options for 2,000 hosts

PrefixMaskUsable hostsSpare
/21255.255.248.02,04646
/20255.255.240.04,0942,094
/19255.255.224.08,1906,190

Rule: find the power of 2 that, minus 2, covers the host count. The exponent is the number of host bits and the prefix is 32 minus those bits.

Step by step

  1. Hosts plus network and broadcast: 2,000 + 2 = 2,002 addresses.
  2. Smallest power of 2 that fits: 211 = 2,048.
  3. Prefix: 32 − 11 = /21 (255.255.248.0).
  4. Usable hosts: 2,048 − 2 = 2,046; 46 spare (98% used).

Other host counts

HostsPrefixUsableUsed
2/312100%
6/296100%
10/281471%
14/2814100%
20/273067%
30/2730100%
50/266281%
60/266297%
100/2512679%
120/2512695%
200/2425479%
250/2425498%
500/2351098%
1,000/221,02298%
2,000/212,04698%
4,000/204,09498%

In practice

With 2,000 hosts the /21 is 98% used and only 46 addresses are spare. If you want the 20–30% headroom suggested in the FAQ below, a /20 gives 4,094 usable hosts and sits at 49%.

To try other values, open the Hosts → mask calculator with these numbers already filled in.

More questions like this

Frequently asked questions

Should I leave headroom?

Yes. Keep at least 20–30% for growth, printers, cameras and network gear; renumbering later costs more.

Why subtract 2 hosts?

The first address identifies the network and the last is the broadcast; neither can be assigned to a device. On /31 links (RFC 3021) both are used.