Determine CIDR Notation From an IP Range
Intermediate CalculateQuestion
A network engineer is given the IP range 192.168.0.0 through 192.168.15.255 and must express it as a single CIDR block. What is the correct CIDR notation, and how many usable host addresses does it contain?
Given
{
"start": "192.168.0.0",
"end": "192.168.15.255"
}
Answer
{
"cidr": "192.168.0.0/20",
"host_count": 4094
}
Try to solve it first, then click Reveal Answer
Step-by-Step Explanation
Step 1: Calculate the total address count
Third octet runs from 0 to 15 → 16 distinct /24s
16 × 256 addresses = 4096 addresses total
Or by integer subtraction:
192.168.0.0 → last two octets: 0 × 256 + 0 = 0
192.168.15.255 → last two octets: 15 × 256 + 255 = 4095
total = 4095 - 0 + 1 = 4096
Step 2: Express as a power of 2
4096 = 2^12
host_bits = 12
prefix = 32 - 12 = /20
Step 3: Confirm the starting address is on a /20 boundary
A /20 boundary in the third octet falls at multiples of 16 (since 2^(20-16) = 16):
0, 16, 32, 48, …
192.168.0.0 has third octet = 0 (multiple of 16) — valid /20 boundary. ✓
Step 4: Calculate usable hosts
usable = 2^12 - 2 = 4096 - 2 = 4094
Step 5: Write CIDR notation
192.168.0.0/20
Verification
192.168.0.0/20 range: 192.168.0.0 – 192.168.15.255 ✓
Summary
| Property | Value |
|---|---|
| Range | 192.168.0.0 – 192.168.15.255 |
| Total addresses | 4096 |
| CIDR notation | 192.168.0.0/20 |
| Subnet mask | 255.255.240.0 |
| Usable hosts | 4094 |
Related Terms
More Calculate Worksheets
Convert a Binary Subnet Mask to Dotted-Decimal Notation
Beginner
How Many Hosts Are in a /24 Subnet?
Beginner
How Many Hosts Are in a /26 Subnet?
Beginner
How Many IP Addresses Are in the Range 10.0.0.0 – 10.0.3.255?
Beginner
How Many /24 Subnets Fit Inside 172.16.0.0/16?
Intermediate
How Many /28 Subnets Fit Inside a /24?
Intermediate