How Many IP Addresses Are in the Range 10.0.0.0 – 10.0.3.255?

Beginner Calculate

Question

A firewall rule needs to cover every IP from 10.0.0.0 to 10.0.3.255. How many total IP addresses does this range contain, and what CIDR prefix exactly describes it?

Given

{
  "start": "10.0.0.0",
  "end": "10.0.3.255"
}

Answer

{
  "total_ips": 1024,
  "prefix": 22
}

Try to solve it first, then click Reveal Answer

Step-by-Step Explanation

Step 1: Calculate total IPs by subtraction

Convert both addresses to 32-bit integers and subtract:

10.0.0.0   →  10×2²⁴ + 0 + 0 + 0   = 167 772 160
10.0.3.255 →  10×2²⁴ + 0 + 3×2⁸ + 255 = 167 773 183

total_ips = end_int - start_int + 1
total_ips = 167 773 183 - 167 772 160 + 1 = 1024

Step 2: Confirm as a power of 2

1024 = 2^10

A contiguous block of 2^10 addresses corresponds to a prefix of:

prefix = 32 - 10 = /22

Step 3: Verify the CIDR notation

A /22 starting at 10.0.0.0:

Block size: 2^(32-22) = 2^10 = 1024
Range:      10.0.0.0 – 10.0.3.255   ✓

The third octet spans 0, 1, 2, 3 — four consecutive /24s aggregated into one /22.

Step 4: Quick check using octet arithmetic

The third octet runs from 0 to 3 (4 values × 256 addresses each = 1024).

Summary

Property Value
Start address 10.0.0.0
End address 10.0.3.255
Total IPs 1024
CIDR prefix 10.0.0.0/22
Subnet mask 255.255.252.0

Related Terms

More Calculate Worksheets