How Many /24 Subnets Fit Inside 172.16.0.0/16?

Intermediate Calculate

Question

An enterprise network uses the 172.16.0.0/16 private address space. The network team wants to allocate individual /24 subnets to each department. How many /24 subnets can they create, and how many usable hosts does each provide?

Given

{
  "network": "172.16.0.0/16",
  "target_prefix": 24
}

Answer

{
  "subnet_count": 256,
  "hosts_per_subnet": 254
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Calculate borrowed bits

borrowed_bits = target_prefix - original_prefix
borrowed_bits = 24 - 16 = 8

Step 2: Calculate number of subnets

subnet_count = 2^borrowed_bits
subnet_count = 2^8 = 256

Step 3: Calculate hosts per /24

host_bits    = 32 - 24 = 8
total_addrs  = 2^8     = 256
usable_hosts = 256 - 2 = 254

Step 4: Enumerate the subnets

Each /24 advances the third octet by 1:

172.16.0.0/24   (172.16.0.1  – 172.16.0.254)
172.16.1.0/24   (172.16.1.1  – 172.16.1.254)
172.16.2.0/24   (172.16.2.1  – 172.16.2.254)
...
172.16.255.0/24 (172.16.255.1 – 172.16.255.254)

Total = 256 subnets.

Verification

256 subnets × 256 addresses each = 65 536 addresses = 2^16  ✓

Summary

Property Value
Parent block 172.16.0.0/16
Target prefix /24
Borrowed bits 8
Subnet count 256
Hosts per subnet 254

This is the standard enterprise design: a /16 private range divided into 256 department-level /24s, giving each department up to 254 host addresses.

Related Terms

More Calculate Worksheets