Smallest Prefix Length That Accommodates 200 Hosts

Intermediate Calculate

Question

A server VLAN needs to support 200 servers. What is the smallest CIDR prefix that can accommodate 200 usable hosts, and how many addresses go to waste?

Given

{
  "required_hosts": 200
}

Answer

{
  "prefix": 24,
  "usable_hosts": 254,
  "wasted": 54
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Find the minimum host bits needed

We need 2^n - 2 >= 200:

Host bits (n) Total (2^n) Usable (2^n − 2) Enough?
7 128 126 No (126 < 200)
8 256 254 Yes (254 ≥ 200)

Minimum host bits required = 8.

Step 2: Convert to prefix length

prefix = 32 - 8 = /24

Step 3: Confirm usable hosts

usable = 2^8 - 2 = 256 - 2 = 254

Step 4: Calculate wasted addresses

wasted = 254 - 200 = 54

Alternative (too small)

A /25 provides only 2^7 - 2 = 126 usable hosts — not enough for 200 devices.

Note on growth

If the VLAN is expected to grow beyond 254 hosts, consider a /23 (510 usable hosts) instead. Migrating subnets later is operationally expensive.

Summary

Property Value
Required hosts 200
Minimum prefix /24
Usable hosts 254
Wasted addresses 54
Subnet mask 255.255.255.0

Related Terms

More Calculate Worksheets