IP Subnet Calculator
Network address, host range, broadcast, mask and every subnet for an IPv4 address, plus IPv6 ranges.
Runs in your browser โ nothing uploadednew
Was this tool helpful?
Comments
Something not working, or an idea to make this tool better? Write it here.
No comments yet. Be the first.
How to use IP Subnet Calculator
- Pick a subnet mask, for example 255.255.255.0 /24, and type an IPv4 address. The network class only limits which masks are offered.
- Press Calculate for the network address, the usable host range, the broadcast address, the masks and a list of the neighbouring subnets.
- For IPv6, use the second calculator: choose a prefix length and enter the address, in full or shortened with ::.
CIDR cheat sheet
The prefix lengths people use most, with the mask written both ways.
| CIDR | Subnet mask | Wildcard mask | Addresses | Usable hosts |
|---|---|---|---|---|
| /8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
| /12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
| /16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
| /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 |
Private and special IPv4 ranges
| Range | CIDR | Used for |
|---|---|---|
| 10.0.0.0 to 10.255.255.255 | 10.0.0.0/8 | Private networks |
| 172.16.0.0 to 172.31.255.255 | 172.16.0.0/12 | Private networks |
| 192.168.0.0 to 192.168.255.255 | 192.168.0.0/16 | Private networks, most home routers |
| 127.0.0.0 to 127.255.255.255 | 127.0.0.0/8 | Loopback, the machine itself |
| 169.254.0.0 to 169.254.255.255 | 169.254.0.0/16 | Link-local, used when no DHCP server answers |
| 100.64.0.0 to 100.127.255.255 | 100.64.0.0/10 | Shared space for carrier-grade NAT |
| 224.0.0.0 to 239.255.255.255 | 224.0.0.0/4 | Multicast |
The calculator labels the address you enter with one of these types, or Public when it is in none of them.
The IP class comes from the first number: A is 0 to 127, B is 128 to 191, C is 192 to 223, D is 224 to 239 and E is 240 to 255. Classes are history now. The prefix length decides the network.
The subnet formulas
- Addresses in a subnet
- addresses = 2 ^ (32 โ prefix length)
/26 = 2 ^ 6 = 64 addresses, 62 of them usable - Network address
- IP address AND subnet mask, bit by bit
192.168.1.130 with /26 (255.255.255.192) = 192.168.1.128 - Broadcast address
- network address + addresses โ 1
192.168.1.128 + 63 = 192.168.1.191 - Usable host range
- network address + 1 to broadcast address โ 1
192.168.1.129 to 192.168.1.190 - Addresses in an IPv6 prefix
- addresses = 2 ^ (128 โ prefix length)
/64 = 2 ^ 64 = 18,446,744,073,709,551,616 addresses
Questions
- Is it free?
- Yes. It runs in your browser, and nothing you type is sent anywhere.
- What does the subnet calculator show?
- For an IPv4 address and prefix it gives the network address, the usable host range, the broadcast address, the total and usable number of hosts, the subnet and wildcard masks, the binary mask, the IP class, the CIDR notation and whether the address is private, public, loopback, link-local, shared (CGNAT) or multicast.
- Why are there two fewer usable hosts than addresses?
- In a normal subnet the first address names the network and the last is the broadcast address, so a /24 has 256 addresses and 254 usable hosts. A /31 is the exception โ both addresses are usable on a point-to-point link โ and a /32 is a single host.
- What is a wildcard mask?
- The subnet mask with every bit flipped. For 255.255.255.0 it is 0.0.0.255. Routers and firewall rules (for example Cisco ACLs and OSPF) use it to say which bits of an address must match.
- Does it work with IPv6?
- Yes. Enter an IPv6 address and a prefix length to see the compressed and full forms of the address, the network, the first and last address in the range, and how many addresses it holds.
- Can it list every subnet of a given size?
- Yes. Under the result is a table of every network of the chosen size inside the larger block around it, with the usable range and broadcast address of each. When there are more than 256, the first 256 are shown.
Also called
- subnet mask calculator
- subnet mask
- CIDR calculator
- IPv4 subnet
- IPv6 subnet
- subnet calculator
- IP range calculator
- wildcard mask
IP Subnet Calculator does all of these. Looking for something else? Search every tool.