Network tool
Subnet calculator
Enter an IPv4 or IPv6 address with a CIDR prefix (or an IPv4 subnet mask) to get the network and broadcast addresses, usable host range, mask and wildcard. Results update as you type.
Result
Cheat sheet
IPv4 subnet cheat sheet (/8 to /32)
Every IPv4 prefix length with its subnet mask, wildcard mask and number of hosts.
| CIDR | Subnet mask | Wildcard | Addresses | Usable hosts |
|---|---|---|---|---|
| /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 |
| /32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
How to use the subnet calculator
- Enter an address with a prefix, such as 192.168.10.0/26 or 2001:db8::/48.
- For IPv4 you can enter a subnet mask (255.255.255.192) instead of a prefix.
- Read the network and broadcast addresses, the usable host range, the masks and the address count.
- Use the cheat sheet to compare every IPv4 prefix length at a glance.
When it helps
- Planning a network
- Split one range into smaller subnets for offices, VLANs or guest Wi-Fi without overlaps.
- Firewall and cloud rules
- Check exactly which addresses a CIDR rule in a security group or firewall will match.
- Certification study
- Practise the subnetting questions found in CCNA, Network+ and cloud exams.
How subnetting works
An IPv4 address has 32 bits. The prefix length (the number after the slash) says how many of those bits identify the network; the rest identify hosts inside it. A /26 leaves 6 host bits, so it holds 2⁶ = 64 addresses, of which 62 can be assigned to devices.
Common home networks are /24 (255.255.255.0, 254 devices). Point-to-point links between routers often use /30 or /31, and a single host is /32. In IPv6, a normal LAN is always a /64.
FAQ
Frequently asked questions
What does /24 mean?
The number after the slash is the prefix length: how many bits of the address identify the network. A /24 keeps the first 24 bits fixed, leaving 8 bits for 256 addresses (254 usable hosts) — the same as the subnet mask 255.255.255.0.
Why are there two fewer usable hosts?
In a normal IPv4 subnet the first address identifies the network and the last is the broadcast address, so neither can be given to a device. /31 and /32 are special cases used for point-to-point links and single hosts.
How big is an IPv6 /64?
A /64 contains 18,446,744,073,709,551,616 addresses. It is the standard size for a single IPv6 network, such as one home LAN.