Subnet for 5000 hosts

A network that needs 5000 hosts fits in a /19, mask 255.255.224.0, with 8,190 usable addresses.

5,000
Hosts needed
/19
Smallest fitting prefix
255.255.224.0
Subnet mask
8,190
Usable hosts

A network built for 5000 hosts needs a /19. The mask is 255.255.224.0, and its 8,190 usable addresses leave 3,190 spare for growth.

The next smaller block, a /20, only allows 4,094 usable addresses, which is not enough for 5000 hosts. That makes /19 the smallest block that fits.

Enter any address below to see the exact network, broadcast, and host range for a /19 block.

Calculate a /19 network

Accepts CIDR (192.0.2.0/24), IP + mask (192.0.2.0 255.255.255.0), or a bare IP (defaults to /24).

Network address192.0.0.0
Usable host range192.0.0.1 - 192.0.31.254
Broadcast address192.0.31.255
Usable hosts8,190
Subnet mask255.255.224.0
Wildcard mask0.0.31.255
CIDR notation192.0.0.0/19
Total addresses8,192
IP (binary)11000000.00000000.00000010.00000000
Mask (binary)11111111.11111111.11100000.00000000
Try:

Example: 192.0.2.0/19

Taking 192.0.2.0/19 as a worked example, a /19 block breaks down like this:

Network address192.0.0.0
Usable range192.0.0.1 - 192.0.31.254
Broadcast address192.0.31.255
Total addresses8,192
Usable hosts8,190

Frequently asked questions

What subnet mask do I need for 5000 hosts?

A network with 5000 hosts fits in a /19, which uses the mask 255.255.224.0 and provides 8,190 usable addresses.

How many addresses does a /19 block have in total?

A /19 has 8,192 total addresses, 8,190 of them usable (the total minus the network and broadcast addresses, except for /31 and /32).

Does a /19 waste any addresses for 5000 hosts?

Yes, 3,190 addresses of headroom. A /19 provides 8,190 usable addresses for the 5000 you need, and the next smaller block, a /20, does not hold enough.

How do I work this out myself?

Find the smallest power of two, minus two, that is at least 5000. That takes 13 host bits, which leaves a /19 prefix. See how to calculate a subnet mask for the full method.