IP Subnet Calculator: CIDR, Mask, Host Range & IPv6
Calculate IPv4 and IPv6 subnets: network address, broadcast, usable host range, and prefix info. Binary visualizer, cheat sheet, and CIDR converter. Free subnet calculator for engineers.
Technology & IT
Calculate IP ranges, subnet masks, and usable hosts. Visual binary breakdown and cheat sheet.
1s = Network bits (blue), 0s = Host bits (green). A /24 uses exactly 3 octets.
Think of the internet like a city. The network portion identifies the streetโrouters use it to reach the right neighborhood. The host portion is the house number.
A /24 gives you 256 addresses; a /16 gives you 65,536. The CIDR number shows where network ends and host begins.
Why /24 instead of 255.255.255.0? Same thing. The dotted-decimal mask means the first 24 bits are network. CIDR condenses that to /24.
CIDR is shorter and works across all mask lengths. Common in firewalls, AWS security groups, and router configs.
Why subtract 2? The network address (all host bits 0) and broadcast address (all host bits 1) are reserved.
Usable hosts = 2host_bits โ 2.
Click a row to apply that prefix to the calculator. Search by prefix (/24), mask, or hosts (e.g. 500).
| Prefix | Subnet Mask | Usable Hosts |
|---|---|---|
| /8 | 255.0.0.0 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,574 |
| /13 | 255.248.0.0 | 524,286 |
| /14 | 255.252.0.0 | 262,142 |
| /15 | 255.254.0.0 | 131,070 |
| /16 | 255.255.0.0 | 65,534 |
| /17 | 255.255.128.0 | 32,766 |
| /18 | 255.255.192.0 | 16,382 |
| /19 | 255.255.224.0 | 8,190 |
| /20 | 255.255.240.0 | 4,094 |
| /21 | 255.255.248.0 | 2,046 |
| /22 | 255.255.252.0 | 1,022 |
| /23 | 255.255.254.0 | 510 |
| /24 | 255.255.255.0 | 254 |
| /25 | 255.255.255.128 | 126 |
| /26 | 255.255.255.192 | 62 |
| /27 | 255.255.255.224 | 30 |
| /28 | 255.255.255.240 | 14 |
| /29 | 255.255.255.248 | 6 |
| /30 | 255.255.255.252 | 2 |
| /31 | 255.255.255.254 | 2 |
| /32 | 255.255.255.255 | 0 |
Every IP address has two parts: the network prefix (where it lives) and the host portion (which device). Subnet masks and CIDR define the boundary. Here is how the math works and why /24 and /64 show up everywhere.
Calculate IPv4 and IPv6 subnets: network address, broadcast, usable host range, and prefix info. Binary visualizer, cheat sheet, and CIDR converter. Free subnet calculator for engineers.
Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.
Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.
Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.