IP Range Calculator
Enter an IPv4 address and prefix to get the network, broadcast, host range and subnet mask.
Your results will appear here.
IP Range Calculator: formula, step-by-step table and results
How the IP range calculator works
An IPv4 address has 32 bits. The prefix (CIDR) says how many bits belong to the network, and the rest belong to hosts. We apply the subnet mask to the IP with a bitwise AND to get the network address. Setting every host bit to 1 gives the broadcast address. The usable range sits between them.
Usable hosts = 2(32 - prefix) - 2
CIDR table
| CIDR | Subnet mask | Total addresses | Usable hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 16,777,216 | 16,777,214 |
| /16 | 255.255.0.0 | 65,536 | 65,534 |
| /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 |
Frequently asked questions
What is an IP subnet calculator?
It splits an IP address into network and host parts, so you can see the address range, broadcast address and number of hosts.
Why are two addresses not usable?
The first address names the network and the last one is the broadcast. Only /31 and /32 are special cases.
Does it support IPv6?
No. This tool is for IPv4 only.
