Jump to a section
A CIDR prefix counts the IPv4 bits reserved for the network. /24 means 255.255.255.0 with 254 traditional usable hosts; /25 means 255.255.255.128 with 126; /30 means 255.255.255.252 with 2. Each one-bit increase halves the address block.
Key takeaways
- A larger CIDR prefix means a smaller IPv4 block.
- Wildcard masks are the inverse of subnet masks, octet by octet.
- Traditional usable hosts equal total addresses minus network and broadcast addresses through /30.
- /31 and /32 follow special rules and should not be treated like ordinary LAN subnets.
/24 to /32 quick-reference table
These are the prefixes most often used for small IPv4 networks and host rules. Traditional usable-host counts subtract the network and broadcast addresses for /24 through /30; /31 and /32 use the special cases shown below.
| CIDR | Subnet mask | Wildcard mask | Block size | Total / usable |
|---|---|---|---|---|
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 256 / 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 128 / 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 64 / 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 32 / 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 16 / 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 8 / 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 4 / 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 / special case |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 / single address |
Complete IPv4 CIDR table: /0 to /32
Use this table for larger networks, route summaries, cloud CIDR blocks, access lists, and exact host routes. The usable-host column applies the traditional total-minus-two rule through /30; it is a mathematical reference, not a recommendation to deploy every large block as one LAN.
| CIDR | Subnet mask | Wildcard mask | Total addresses | Usable hosts |
|---|---|---|---|---|
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (point-to-point) |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | Single address |
How address counts and block boundaries change
IPv4 contains 32 bits. Subtract the prefix length from 32 to find the number of address bits, then raise two to that power. A /27 leaves five address bits, so it contains 2⁵ or 32 total addresses.
Moving from /26 to /27 halves the block from 64 to 32 addresses. In the last octet, /27 networks therefore start at 0, 32, 64, 96, 128, 160, 192 and 224.
- Total addresses = 2^(32 − prefix length)
- Traditional usable hosts = total addresses − 2
- /27 example: 2^(32 − 27) = 32 total addresses
Worked example: 192.168.50.77/27
A /27 block advances in steps of 32. The address .77 falls between the boundaries .64 and .95, so the network is 192.168.50.64 and the broadcast address is 192.168.50.95.
For a traditional LAN, the usable range is 192.168.50.65 through 192.168.50.94. The subnet mask is 255.255.255.224 and the wildcard mask is 0.0.0.31.
- Block size: 256 − 224 = 32
- Containing block: 64–95
- Network: 192.168.50.64
- Usable: 192.168.50.65–192.168.50.94
- Broadcast: 192.168.50.95
What a wildcard mask means
A wildcard mask is the bitwise inverse of the subnet mask: subtract each subnet-mask octet from 255. In access-control matching, a wildcard bit of 0 means the corresponding address bit must match, while 1 means it may vary.
For 192.168.50.64/27, the wildcard is 0.0.0.31. In a Cisco-style address-and-wildcard rule, 192.168.50.64 0.0.0.31 matches addresses from .64 through .95. Whether all those addresses are valid hosts is a separate subnet question.
Choose a subnet with enough working room
Count gateways, access points, servers, printers, clients and expected growth before selecting a prefix. The following rows use traditional LAN host counts.
| Endpoints required now | Smallest traditional subnet | Usable hosts |
|---|---|---|
| 2 | /30 | 2 |
| 6 | /29 | 6 |
| 14 | /28 | 14 |
| 30 | /27 | 30 |
| 62 | /26 | 62 |
| 126 | /25 | 126 |
| 254 | /24 | 254 |
Special cases: /31 and /32
A /31 has two addresses. On supported point-to-point links, both can represent endpoints because a separate broadcast address is unnecessary. It is not a general replacement for an ordinary two-host LAN.
A /32 represents one exact IPv4 address. It is commonly used for host routes, loopback addresses, firewall rules, and references to a single endpoint.
Check the exact network before applying it
A prefix and host address must be combined to determine the actual network address, broadcast address, and host range. Use the IPv4 subnet calculator for that final check.
- Confirm that planned subnets do not overlap.
- Reserve enough capacity for gateways and future devices.
- Verify DHCP boundaries and static-address reservations.
- Document each network using its network address and CIDR prefix.
Use the numbers
Related calculators
Common questions
Questions, answered.
What subnet mask is /24?+
/24 is 255.255.255.0. It contains 256 total addresses and traditionally 254 usable host addresses.
What subnet mask is /28?+
/28 is 255.255.255.240. It contains 16 total addresses and traditionally 14 usable host addresses.
How many usable hosts are in a /26?+
A /26 contains 64 total addresses and traditionally 62 usable host addresses.
Can I use both addresses in a /31?+
Yes on a properly supported point-to-point link. /31 is a special case and is not used like a traditional broadcast LAN.
What does /25 CIDR mean?+
/25 reserves 25 IPv4 bits for the network. Its mask is 255.255.255.128, wildcard mask is 0.0.0.127, and each block contains 128 addresses with 126 traditional usable hosts.
Sources & review
How this guide was checked.
NetCalcKit reviews formulas against worked examples and uses primary technical references where they apply. Estimates remain clearly labelled because real networks and services vary.