CIDR Notation Chart: Full /0 to /32 Cheat Sheet
This is a complete CIDR notation chart for IPv4. Every prefix from /0 to /32 is listed below with its subnet mask, wildcard mask, number of host bits, total addresses and usable hosts. CIDR is written as an address followed by a slash and a prefix length — like 192.168.1.0/24 — where the number is how many leading bits form the network. Bookmark this page as a cheat sheet, or jump straight to the subnet calculator to expand any specific network.
IPv4 CIDR chart (/0 to /32)
Usable hosts is the total minus 2 (the network and broadcast addresses), except for a /31, which RFC 3021 defines for point-to-point links with both addresses usable, and a /32, which is a single host route.
| CIDR | Subnet mask | Wildcard mask | Host bits | Total addresses | Usable hosts |
|---|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 32 | 4,294,967,296 | 4,294,967,294 |
| /1 | 128.0.0.0 | 127.255.255.255 | 31 | 2,147,483,648 | 2,147,483,646 |
| /2 | 192.0.0.0 | 63.255.255.255 | 30 | 1,073,741,824 | 1,073,741,822 |
| /3 | 224.0.0.0 | 31.255.255.255 | 29 | 536,870,912 | 536,870,910 |
| /4 | 240.0.0.0 | 15.255.255.255 | 28 | 268,435,456 | 268,435,454 |
| /5 | 248.0.0.0 | 7.255.255.255 | 27 | 134,217,728 | 134,217,726 |
| /6 | 252.0.0.0 | 3.255.255.255 | 26 | 67,108,864 | 67,108,862 |
| /7 | 254.0.0.0 | 1.255.255.255 | 25 | 33,554,432 | 33,554,430 |
| /8 | 255.0.0.0 | 0.255.255.255 | 24 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 23 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 22 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 21 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 20 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 19 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 18 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 17 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 16 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 15 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 14 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 13 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 12 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 11 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 10 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 9 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 8 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 7 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 6 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 5 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 4 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 3 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 2 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 1 | 2 | 2 (RFC 3021 P2P) |
| /32 | 255.255.255.255 | 0.0.0.0 | 0 | 1 | 1 (host route) |
How to read a prefix like /26
The prefix counts network bits from the left, so a larger prefix number always means a smaller network. Take /26: 26 network bits leave 6 host bits, which is 26 = 64 addresses and 62 usable. Its mask is 255.255.255.192 because 26 ones fill the first three octets and two more bits of the fourth (128 + 64 = 192). Each extra bit on the prefix halves the block — a /27 is 32 addresses, a /28 is 16 — so once you know one row you can derive its neighbours instantly.
The mental-math shortcut
For any IPv4 prefix the host-bit count is 32 − prefix, and the address count is 2 raised to that power; subtract 2 for usable hosts. Need room for 500 devices? 29 = 512 covers it, so 9 host bits means a /23. Going the other way, a /20 has 12 host bits, 212 = 4096 addresses and 4094 usable. The full mechanics are in CIDR notation explained, and if the network-versus-host split is still fuzzy, start with what a subnet is.
Common IPv6 prefixes
IPv6 uses the same slash syntax over a 128-bit address, so prefixes run /0 to /128. There is no broadcast address and no "minus 2" — a block simply holds 2(128 − prefix) addresses. The everyday sizes are larger and rounder:
| IPv6 prefix | Typical use | Subnets / addresses |
|---|---|---|
| /128 | Single host (loopback, host route) | 1 address |
| /127 | Point-to-point link (RFC 6164) | 2 addresses |
| /64 | Standard single subnet (one LAN) | 264 addresses |
| /56 | Typical home / small-site allocation | 256 × /64 subnets |
| /48 | Typical site / enterprise allocation | 65,536 × /64 subnets |
| /32 | Typical ISP allocation | 65,536 × /48 sites |
Need the full breakdown for one specific network — ranges, broadcast, binary mask?
Open the Subnet CalculatorFrequently asked questions
What is the /26 CIDR subnet mask?
A /26 prefix means the first 26 bits of the IPv4 address are the network portion, which gives a subnet mask of 255.255.255.192 and a wildcard mask of 0.0.0.63. That leaves 6 host bits, so a /26 block contains 2 to the power of 6 = 64 total addresses, of which 62 are usable for hosts after subtracting the network and broadcast addresses. A /26 is exactly one quarter of a /24, so a single 255.255.255.0 network divides cleanly into four /26 subnets: .0–.63, .64–.127, .128–.191 and .192–.255. It is a popular size for small office segments or VLANs that need between 31 and 62 devices, where a /24 would waste addresses and a /27 (30 hosts) would be too small.
What format is CIDR notation written in?
CIDR notation is written as an IP address, a forward slash, and a prefix length — for example 192.168.1.0/24 for IPv4 or 2001:db8::/48 for IPv6. The number after the slash is the count of leading bits that are fixed as the network portion of the address. IPv4 prefixes range from /0 to /32 because an IPv4 address is 32 bits long; IPv6 prefixes range from /0 to /128. The format replaced the older class-based system (Class A, B, C) so a network can be any size rather than a fixed boundary. Reading it is direct: the prefix tells you how many network bits there are, and 32 minus that prefix (for IPv4) tells you how many host bits remain to size the block.
How many usable hosts are in a /24, /26 and /30?
For ordinary IPv4 subnets you take 2 to the power of the host bits, then subtract 2 for the network and broadcast addresses. A /24 has 8 host bits, so 256 total addresses and 254 usable. A /26 has 6 host bits, so 64 total and 62 usable. A /30 has 2 host bits, so 4 total and 2 usable — the classic size for a point-to-point link between two routers. The two exceptions to the minus-2 rule are at the very end of the range: a /31 (RFC 3021) is used for point-to-point links and treats both of its 2 addresses as usable, and a /32 describes a single host route with exactly one address. The full chart on this page lists every prefix from /0 to /32 so you never have to compute the powers of two by hand.
What is the difference between a subnet mask and a wildcard mask?
A subnet mask and a wildcard mask are bitwise inverses of each other. The subnet mask marks the network bits with ones and the host bits with zeros — for a /24 that is 255.255.255.0. The wildcard mask flips every bit, marking the host bits with ones, so the /24 wildcard is 0.0.0.255. Subnet masks are what you configure on interfaces and see in routing tables, while wildcard masks appear in access control lists and OSPF network statements, especially on Cisco equipment, where they describe which bits to match and which to ignore. They always sum to 255 in each octet, so converting between them is just 255 minus each octet. This chart lists both forms side by side for every prefix.