How to use the Subnet Calculator
- Type an IP address with a prefix (
10.0.0.0/16) or a mask (10.0.0.0 255.255.0.0), or pick the prefix from the list. - Read the network, broadcast, first and last usable host, masks and host count in the results table.
- Under Split into subnets, choose a longer prefix to list every smaller subnet inside the network.
- Under IP range to CIDR, enter a first and last address to get the smallest list of CIDR blocks that covers it.
IPv4 subnet cheat sheet
| Prefix | Subnet mask | Addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /9 | 255.128.0.0 | 8,388,608 | 8,388,606 |
| /10 | 255.192.0.0 | 4,194,304 | 4,194,302 |
| /11 | 255.224.0.0 | 2,097,152 | 2,097,150 |
| /12 | 255.240.0.0 | 1,048,576 | 1,048,574 |
| /13 | 255.248.0.0 | 524,288 | 524,286 |
| /14 | 255.252.0.0 | 262,144 | 262,142 |
| /15 | 255.254.0.0 | 131,072 | 131,070 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /17 | 255.255.128.0 | 32,768 | 32,766 |
| /18 | 255.255.192.0 | 16,384 | 16,382 |
| /19 | 255.255.224.0 | 8,192 | 8,190 |
| /20 | 255.255.240.0 | 4,096 | 4,094 |
| /21 | 255.255.248.0 | 2,048 | 2,046 |
| /22 | 255.255.252.0 | 1,024 | 1,022 |
| /23 | 255.255.254.0 | 512 | 510 |
| /24 | 255.255.255.0 | 256 | 254 |
| /25 | 255.255.255.128 | 128 | 126 |
| /26 | 255.255.255.192 | 64 | 62 |
| /27 | 255.255.255.224 | 32 | 30 |
| /28 | 255.255.255.240 | 16 | 14 |
| /29 | 255.255.255.248 | 8 | 6 |
| /30 | 255.255.255.252 | 4 | 2 |
| /31 | 255.255.255.254 | 2 | 2 |
| /32 | 255.255.255.255 | 1 | 1 |
How subnetting works
An IPv4 address is 32 bits. The prefix length says how many of them, counted from the left, name the network; the rest number the hosts inside it. In 192.168.1.10/24 the first 24 bits (192.168.1) are the network and the last 8 bits leave room for 256 addresses.
- The network address has all host bits set to 0 (192.168.1.0) and the broadcast address has them all set to 1 (192.168.1.255). Neither can be given to a device, so a /24 has 254 usable hosts.
- The subnet mask is the prefix written as an address: /24 is 255.255.255.0. The wildcard mask is its inverse (0.0.0.255), used in Cisco ACLs and OSPF.
- A /31 has 2 usable addresses, for point-to-point links (RFC 3021), and a /32 is a single host.
Private address ranges
These ranges (RFC 1918) are free to use inside any network and are never routed on the internet: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16. Carrier-grade NAT uses 100.64.0.0/10, and 169.254.0.0/16 is link-local.
Frequently asked questions
Is there a free subnet calculator for both IPv4 and IPv6?
Yes. Enter an address with a prefix, like 192.168.1.10/24 or 2001:db8::/48, into curlybits' Subnet Calculator to get the network, broadcast, host range, masks and host count, plus subnet splitting and range-to-CIDR conversion. It's free and runs in your browser.
How many hosts are in a /24?
256 addresses, of which 254 can be used by devices. The network (.0) and broadcast (.255) addresses are reserved.
What is the subnet mask for /27?
255.255.255.224. It has 32 addresses and 30 usable hosts.
Does it support IPv6?
Yes. Enter an address like 2001:db8::1/64 to see the network, the first and last address and the number of addresses. IPv6 has no broadcast address.
Is my data sent anywhere?
No. Every calculation runs in your browser.
Updated