Subnet Cheat Sheet
Every IPv4 prefix length in one table: subnet mask, wildcard, addresses and usable hosts, with a full calculator right below.
- /0 to /32
- Masks & wildcards
- Hosts per subnet
- Calculator included
| CIDR | Subnet mask | Wildcard | Addresses | Usable hosts | Class C size |
|---|---|---|---|---|---|
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 | 1/256 C |
| /31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 | 1/128 C |
| /30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 | 1/64 C |
| /29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 | 1/32 C |
| /28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 | 1/16 C |
| /27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 | 1/8 C |
| /26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 | 1/4 C |
| /25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 | 1/2 C |
| /24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 | 1 C |
| /23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 | 2 C |
| /22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 | 4 C |
| /21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 | 8 C |
| /20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 | 16 C |
| /19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 | 32 C |
| /18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 | 64 C |
| /17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 | 128 C |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 | 256 C |
| /15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 | 512 C |
| /14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 | 1024 C |
| /13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 | 2048 C |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 | 4096 C |
| /11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 | 8192 C |
| /10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 | 16384 C |
| /9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 | 32768 C |
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 | 65536 C |
| /7 | 254.0.0.0 | 1.255.255.255 | 33,554,432 | 33,554,430 | 131072 C |
| /6 | 252.0.0.0 | 3.255.255.255 | 67,108,864 | 67,108,862 | 262144 C |
| /5 | 248.0.0.0 | 7.255.255.255 | 134,217,728 | 134,217,726 | 524288 C |
| /4 | 240.0.0.0 | 15.255.255.255 | 268,435,456 | 268,435,454 | 1048576 C |
| /3 | 224.0.0.0 | 31.255.255.255 | 536,870,912 | 536,870,910 | 2097152 C |
| /2 | 192.0.0.0 | 63.255.255.255 | 1,073,741,824 | 1,073,741,822 | 4194304 C |
| /1 | 128.0.0.0 | 127.255.255.255 | 2,147,483,648 | 2,147,483,646 | 8388608 C |
| /0 | 0.0.0.0 | 255.255.255.255 | 4,294,967,296 | 4,294,967,294 | 16777216 C |
Also accepts a mask: 10.0.0.5 255.255.252.0
192.168.1.0/24
- Network address
- 192.168.1.0
- Broadcast address
- 192.168.1.255
- Usable host range
- 192.168.1.1 – 192.168.1.254
- Usable hosts
- 254
- Total addresses
- 256
- Subnet mask
- 255.255.255.0
- Wildcard mask
- 0.0.0.255
- CIDR notation
- /24
- IP class
- C
- Address type
- Private (RFC 1918)
- Reverse DNS zone
- 1.168.192.in-addr.arpa
- IPv4-mapped IPv6
- ::ffff:192.168.1.10
- Integer / hex
- 3232235786 · 0xC0A8010A
Binary
- IP
- 11000000.10101000.00000001.00001010
- Mask
- 11111111.11111111.11111111.00000000
- Network
- 11000000.10101000.00000001.00000000
- Broadcast
- 11000000.10101000.00000001.11111111
Network bits are highlighted; the rest are host bits.
4 subnets of 64 addresses (62 usable each).
| Network | Usable range | Broadcast |
|---|---|---|
| 192.168.1.0/26 | 192.168.1.1 – 192.168.1.62 | 192.168.1.63 |
| 192.168.1.64/26 | 192.168.1.65 – 192.168.1.126 | 192.168.1.127 |
| 192.168.1.128/26 | 192.168.1.129 – 192.168.1.190 | 192.168.1.191 |
| 192.168.1.192/26 | 192.168.1.193 – 192.168.1.254 | 192.168.1.255 |
IPv4 subnet cheat sheet
This cheat sheet lists all 33 IPv4 prefix lengths, from /0 (the whole internet) to /32 (a single host), with the matching dotted-decimal subnet mask, wildcard mask, total number of addresses, usable hosts and size relative to a classic /24 (class C). The common boundaries /8, /16 and /24 are highlighted. Below the table, the subnet calculator works out ranges for any specific address.
How to use the subnet cheat sheet
- Find the prefix length or mask you need in the table.
- Read the usable hosts and wildcard mask.
- Use the calculator below for a specific IP address.
- Bookmark the page as a quick reference.
Subnetting essentials
- Usable hosts = 2^(32 − prefix) − 2; the network and broadcast addresses are reserved.
- /31 links have 2 usable addresses (RFC 3021) and /32 is a single host.
- Private ranges: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 (RFC 1918).
- Wildcard mask = 255.255.255.255 − subnet mask, used in Cisco ACLs and OSPF.
Why use this subnet cheat sheet
- Instant and exactResults update as you type, with copy buttons on every value.
- Learn as you goBinary view highlights the network and host bits so subnetting makes sense.
- Splitting built inDivide any network into equal smaller subnets and list each range.
- Nothing leaves your browserNetwork plans and internal addressing are calculated on your device, never logged by a server.
Common uses
- Network design. Plan VLANs and address blocks for offices and data centres.
- Firewall and ACL rules. Get the right wildcard and CIDR for rules.
- Cloud networking. Size AWS, Azure and GCP VPC subnets.
- CCNA and Network+ study. Check subnetting practice with the working shown.
More network tools: convert addresses with the binary to decimal and hex to decimal converters, or test endpoints with the API tester. Browse all developer tools.
Example: picking a subnet for 25 devices
A /27 has 30 usable hosts (mask 255.255.255.224), the smallest prefix that fits 25 devices with a little room to grow.
What to expect from the result
This page calculates IPv4. Use the IPv6 subnet calculator for IPv6 prefixes. Cloud providers reserve extra addresses in each subnet (AWS reserves 5), so usable counts there are lower.
Subnet Cheat Sheet questions
How do I calculate the number of hosts in a subnet?
Hosts = 2^(32 − prefix) − 2. A /24 has 2^8 − 2 = 254 usable hosts; a /26 has 62.
What subnet mask is /24?
255.255.255.0. A /16 is 255.255.0.0 and a /28 is 255.255.255.240.
What is the subnet mask for /27?
255.255.255.224, with 32 addresses and 30 usable hosts.
How many /24 networks are in a /16?
256.
What is a wildcard mask?
The inverse of the subnet mask: 0.0.0.255 for a /24. Cisco ACLs and OSPF use wildcard masks.