Back to tools
IPv4 CIDR Notation Reference
Complete reference table for IPv4 CIDR prefixes, subnet masks, and host counts. Quick lookup for network planning and subnet design.
| Class | CIDR | Total Hosts | Usable Hosts | Netmask | Wildcard Mask |
|---|---|---|---|---|---|
| /0 | 4,294,967,296 | 4,294,967,294 | 0.0.0.0 | 255.255.255.255 | |
| /1 | 2,147,483,648 | 2,147,483,646 | 128.0.0.0 | 127.255.255.255 | |
| /2 | 1,073,741,824 | 1,073,741,822 | 192.0.0.0 | 63.255.255.255 | |
| /3 | 536,870,912 | 536,870,910 | 224.0.0.0 | 31.255.255.255 | |
| /4 | 268,435,456 | 268,435,454 | 240.0.0.0 | 15.255.255.255 | |
| /5 | 134,217,728 | 134,217,726 | 248.0.0.0 | 7.255.255.255 | |
| /6 | 67,108,864 | 67,108,862 | 252.0.0.0 | 3.255.255.255 | |
| /7 | 33,554,432 | 33,554,430 | 254.0.0.0 | 1.255.255.255 | |
| A | /8 | 16,777,216 | 16,777,214 | 255.0.0.0 | 0.255.255.255 |
| /9 | 8,388,608 | 8,388,606 | 255.128.0.0 | 0.127.255.255 | |
| /10 | 4,194,304 | 4,194,302 | 255.192.0.0 | 0.63.255.255 | |
| /11 | 2,097,152 | 2,097,150 | 255.224.0.0 | 0.31.255.255 | |
| /12 | 1,048,576 | 1,048,574 | 255.240.0.0 | 0.15.255.255 | |
| /13 | 524,288 | 524,286 | 255.248.0.0 | 0.7.255.255 | |
| /14 | 262,144 | 262,142 | 255.252.0.0 | 0.3.255.255 | |
| /15 | 131,072 | 131,070 | 255.254.0.0 | 0.1.255.255 | |
| B | /16 | 65,536 | 65,534 | 255.255.0.0 | 0.0.255.255 |
| /17 | 32,768 | 32,766 | 255.255.128.0 | 0.0.127.255 | |
| /18 | 16,384 | 16,382 | 255.255.192.0 | 0.0.63.255 | |
| /19 | 8,192 | 8,190 | 255.255.224.0 | 0.0.31.255 | |
| /20 | 4,096 | 4,094 | 255.255.240.0 | 0.0.15.255 | |
| /21 | 2,048 | 2,046 | 255.255.248.0 | 0.0.7.255 | |
| /22 | 1,024 | 1,022 | 255.255.252.0 | 0.0.3.255 | |
| /23 | 512 | 510 | 255.255.254.0 | 0.0.1.255 | |
| C | /24 | 256 | 254 | 255.255.255.0 | 0.0.0.255 |
| /25 | 128 | 126 | 255.255.255.128 | 0.0.0.127 | |
| /26 | 64 | 62 | 255.255.255.192 | 0.0.0.63 | |
| /27 | 32 | 30 | 255.255.255.224 | 0.0.0.31 | |
| /28 | 16 | 14 | 255.255.255.240 | 0.0.0.15 | |
| /29 | 8 | 6 | 255.255.255.248 | 0.0.0.7 | |
| /30 | 4 | 2 | 255.255.255.252 | 0.0.0.3 | |
| /31 | 2 | 2 | 255.255.255.254 | 0.0.0.1 | |
| /32 | 1 | 1 | 255.255.255.255 | 0.0.0.0 |
About CIDR (Classless Inter-Domain Routing)
CIDR is a method for allocating IP addresses and routing that replaces the old classful network addressing architecture. CIDR notation uses a suffix (e.g., /24) to indicate the number of bits used for the network portion of the address.
How to Read CIDR Notation
The number after the slash (/) represents the network prefix length. For example, 192.168.1.0/24 means:
- • The first 24 bits are the network portion
- • The remaining 8 bits (32-24) are for host addresses
- • This allows for 2^8 = 256 total IP addresses
- • Usable hosts = 256 - 2 = 254 (excluding network and broadcast addresses)
Understanding the Table
- • Class: Traditional network class (A, B, or C) - shown for reference only
- • CIDR: The prefix length (/0 to /32)
- • Total Hosts: All IP addresses in this subnet (2^(32-prefix))
- • Usable Hosts: Total minus network and broadcast addresses
- • Netmask: Subnet mask in dotted decimal notation
- • Wildcard Mask: Inverse of the netmask (used in ACLs and routing)
Common Use Cases
- • /8: Large networks (ISPs, major organizations) - 16.7M hosts
- • /16: Medium-sized networks (enterprises) - 65K hosts
- • /24: Small networks (offices, departments) - 254 usable hosts
- • /30: Point-to-point links - 2 usable hosts
- • /31: Point-to-point links (RFC 3021) - 2 usable hosts, no network/broadcast
- • /32: Single host route
Private IP Address Ranges
- • 10.0.0.0/8 (Class A): 10.0.0.0 - 10.255.255.255
- • 172.16.0.0/12 (Class B): 172.16.0.0 - 172.31.255.255
- • 192.168.0.0/16 (Class C): 192.168.0.0 - 192.168.255.255
Calculating Usable Hosts
For most networks: Usable Hosts = Total Hosts - 2
- • Subtract 1 for the network address (first address)
- • Subtract 1 for the broadcast address (last address)
- • Example: /24 has 256 total addresses, 254 usable (256 - 2)
- • Exception: /31 networks (RFC 3021) use all 2 addresses for point-to-point links
- • Exception: /32 represents a single host (1 usable address)