CIDR Reference Table
Every prefix from /0 to /32 with its subnet mask, wildcard mask, total addresses, usable hosts and block size — plus links to a dedicated page for each commonly used prefix.
Complete CIDR reference table
Every valid IPv4 prefix from /0 to /32 with its mask, wildcard and address counts.
| Prefix | Subnet mask | Wildcard | Total addresses | Usable hosts | Block size |
|---|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 | 4,294,967,296 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 | 2,147,483,648 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 | 1,073,741,824 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 | 536,870,912 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 | 268,435,456 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 | 134,217,728 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 | 67,108,864 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 | 33,554,432 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 16,777,216 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 8,388,608 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 4,194,304 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 2,097,152 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 1,048,576 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 524,288 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 262,144 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 131,072 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 65,536 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 32,768 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 16,384 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 8,192 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 4,096 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 2,048 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 1,024 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 512 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 256 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 128 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 64 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 32 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 8 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 4 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (RFC 3021) | 2 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 1 |
Quick reference: mask to prefix
Reading a mask written in dotted-decimal form. Count the 1 bits, or use the octet boundaries below.
| Subnet mask | Prefix | Wildcard | Usable hosts | Block size |
|---|---|---|---|---|
| 255.255.255.128 | /25 | 0.0.0.128 | 126 | 128 |
| 255.255.255.192 | /26 | 0.0.0.64 | 62 | 64 |
| 255.255.255.224 | /27 | 0.0.0.32 | 30 | 32 |
| 255.255.255.240 | /28 | 0.0.0.16 | 14 | 16 |
| 255.255.255.248 | /29 | 0.0.0.8 | 6 | 8 |
| 255.255.255.252 | /30 | 0.0.0.4 | 2 | 4 |
| 255.255.255.254 | /31 | 0.0.0.2 | 0 | 2 |
| 255.255.255.255 | /32 | 0.0.0.1 | 0 | 1 |
Example: 255.255.255.224 has three 1 bits in its last octet, so the prefix is 24 + 3 = /27, the wildcard is 0.0.0.31 and there are 32 addresses of which 30 are usable.
How to read the table
Each row answers the three questions you have while configuring: what mask do I type, how many hosts does this give me, and where does the next subnet start. The prefix length is the single number that determines all of it.
| Column | Formula | What it tells you |
|---|---|---|
| Subnet mask | prefix ones then (32 − prefix) zeros | What to type on the interface |
| Wildcard mask | bitwise inverse of the mask | What to put in a Cisco ACL or OSPF statement |
| Total addresses | 2^(32 − prefix) | The size of the block |
| Usable hosts | 2^(32 − prefix) − 2 | How many devices you can address |
| Block size | 2^(32 − prefix) | The spacing between consecutive subnets |
The binary mask column is there because counting the ones is the most reliable way to verify a mask is contiguous. A valid mask has no zeros between ones.
The prefixes you will actually use
Four sizes cover the overwhelming majority of real configurations, so it is worth memorising them outright:
- /24 — 254 hosts. The default LAN or VLAN size. Mask 255.255.255.0, wildcard 0.0.0.255, block size 256.
- /25 and /26 — 126 and 62 hosts. Used to split a /24 into two or four segments, usually to separate departments or to contain broadcast domains.
- /30 — 2 hosts. The classic WAN transit link. Mask 255.255.255.252, wildcard 0.0.0.3, block size 4.
- /31 — 2 addresses, no waste. The modern point-to-point link per RFC 3021. Mask 255.255.255.254, wildcard 0.0.0.1.
Everything between /17 and /23 appears in campus and branch designs, and everything below /16 appears in ISP and cloud allocations. The CIDR calculator handles the full range interactively if you need to convert a mask the table does not cover.
Subnets within a subnet
The easiest way to check an allocation is to count how many smaller blocks fit inside a larger one. The rule is to subtract the prefix lengths and raise two to that power: a /24 fits inside a /16 exactly 2^8 = 256 times.
| Parent | Child | Prefix difference | Count |
|---|---|---|---|
| /16 | /24 | 8 bits | 256 |
| /16 | /22 | 6 bits | 64 |
| /20 | /24 | 4 bits | 16 |
| /22 | /27 | 5 bits | 32 |
| /24 | /26 | 2 bits | 4 |
| /24 | /27 | 3 bits | 8 |
| /24 | /30 | 6 bits | 64 |
| /24 | /31 | 7 bits | 128 |
| /25 | /30 | 5 bits | 32 |
| /26 | /29 | 3 bits | 8 |
This table is what makes VLSM planning tractable: you are repeatedly asking how many child blocks of a given size fit in the space remaining. The VLSM planner applies the same arithmetic automatically across a whole requirement list.
Common mistakes
- Subtracting two from a /31 or /32. Those prefixes have no network and broadcast address, so the usable count is 2 and 1 respectively, not 0 and −1.
- Placing a subnet off its block boundary. A /27 must start on a multiple of 32. 192.168.1.16/27 is valid; 192.168.1.20/27 is not, and most routers will reject it.
- Using the wildcard where the mask belongs. They are complements, and swapping them silently matches the wrong traffic in an ACL.
- Forgetting that a /0 has 2^32 addresses. The count needs 64-bit arithmetic; code using a 32-bit shift produces zero or an overflow.
Full CIDR table
The most frequently used prefixes, with the mask, wildcard, counts and binary mask.
| Prefix | Subnet mask | Wildcard | Total addresses | Usable hosts | Block size | Binary mask |
|---|---|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 16,777,216 | 11111111.00000000.00000000.00000000 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 65,536 | 11111111.11111111.00000000.00000000 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 4,096 | 11111111.11111111.11110000.00000000 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 1,024 | 11111111.11111111.11111100.00000000 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 512 | 11111111.11111111.11111110.00000000 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 256 | 11111111.11111111.11111111.00000000 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 128 | 11111111.11111111.11111111.10000000 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 64 | 11111111.11111111.11111111.11000000 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 32 | 11111111.11111111.11111111.11100000 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 16 | 11111111.11111111.11111111.11110000 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 8 | 11111111.11111111.11111111.11111000 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 4 | 11111111.11111111.11111111.11111100 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (RFC 3021) | 2 | 11111111.11111111.11111111.11111110 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (host route) | 1 | 11111111.11111111.11111111.11111111 |
Per-prefix pages
Each of these prefixes has its own page with the mask, host range, worked example and the subnets it contains.
- /16A legacy class B block or a large enterprise allocation.
- /20A common ISP or large-campus allocation, 4,096 addresses.
- /22Common for large branch sites and VPN address pools.
- /23Two /24s — often an aggregation of two VLANs.
- /24The most common subnet size for a single LAN or VLAN. 254 usable hosts.
- /25Half a /24 — used to split a VLAN into two segments.
- /26Common for smaller departments, 62 usable hosts.
- /27Common for small teams, 30 usable hosts.
- /28Often used for small device groups, 14 usable hosts.
- /29Used for small link segments, 6 usable hosts.
- /30The classic point-to-point WAN link, 2 usable hosts.
- /31RFC 3021 point-to-point link with no broadcast address, 2 addresses.
- /32A single host route, used for loopbacks and /32 static routes.
Also useful: subnet calculator, VLSM planner, CIDR notation explained, subnetting guide.
IP to Binary Converter · Binary to IP Converter · IP to Hex Converter · Hex to IP Converter · IP to Decimal Converter ·
Frequently asked questions
What is a CIDR table used for?
It is the lookup you reach for while configuring. Given a prefix length you need the mask to type into an interface, the wildcard to put in an ACL, and the address count to sanity-check the allocation. Having all 33 prefixes in one place removes the arithmetic from the configuration step.
What is the difference between total addresses and usable hosts?
Total addresses is 2^(32 − prefix) and includes the network and broadcast address. Usable hosts subtracts those two, so a /24 has 256 total addresses and 254 usable hosts. The exceptions are /31, which RFC 3021 defines as a two-address point-to-point link with no reserved addresses, and /32, which is a single host route.
What is block size?
Block size is the number of addresses in the subnet, which is the same number as the total address count. It matters because it tells you the spacing between consecutive subnets: /27 blocks start every 32 addresses, so within a /24 they begin at .0, .32, .64, .96, .128, .160, .192 and .224. A subnet that does not start on a block-size boundary overlaps its neighbours.
Why do some prefixes have no description?
Prefixes between the common sizes are perfectly valid but rarely used in isolation. A /13 or a /19 appears mostly inside aggregate routing tables rather than on an interface. The table still lists their mask, wildcard and counts so the lookup is complete.
How many /24 subnets are in a /16?
256. The difference in prefix length is 8 bits, and 2^8 = 256. The same rule generalises: a /20 contains 2^(24−20) = 16 /24s, and a /8 contains 2^(24−8) = 65,536 /24s.
Which prefix should I use for a point-to-point link?
A /31 under RFC 3021 gives you two usable addresses with no waste, which is the modern default on router-to-router links. A /30 is the older convention and gives two usable addresses out of four, wasting two. Use /31 unless a platform does not support it.
What is the smallest usable subnet?
A /30 gives two usable hosts, a /31 gives two addresses on a point-to-point link, and a /32 is a single host. Anything longer than /32 is not a valid IPv4 prefix.