CIDR Calculator – Subnet Size and Host Count
Calculate subnet size, host count, and subnet mask from CIDR prefix length.
About This Calculator
Calculate subnet size, host count, and subnet mask from CIDR prefix length. Use the calculator above for instant results.
Worked Examples
Example 1: /24
- 256 total | 254 usable | Mask: 255.255.255.0
Answer: 254 usable hosts
Example 2: /16
- 65,536 total | 65,534 usable
Answer: 65,534 hosts
Example 3: /30 (point-to-point)
- 4 total | 2 usable
Answer: 2 hosts
Who Uses This Calculator?
Network Engineers
Quick CIDR reference.
CCNA Students
Subnetting study.
IT Admins
IP planning.
CS Students
Networking coursework.
Common Mistakes to Avoid
❌ CIDR /32 is a single host
1 address, 0 usable hosts. Used for loopbacks and host routes.
❌ /31 for point-to-point (RFC 3021)
Both addresses usable for point-to-point links. Common on modern networks.
Frequently Asked Questions
CIDR explained?
Number after slash = 1-bits in subnet mask. /24 = 24 ones = 255.255.255.0.
Power of 2?
Each prefix +1 halves the network. /24=256, /25=128, /26=64...
Supernetting?
Shorter prefix aggregates multiple subnets. Used in routing table optimization.