CIDR Subnet Calculator network
Work out network address, broadcast, host range, and usable host count from a CIDR block.
What this tool does
CIDR notation expresses a network range by appending a slash and a number to an IP address. In 192.168.1.0/24 the 24 means the first 24 bits identify the network and the remaining 8 bits address hosts, giving 256 addresses in the block.
Only 254 of those can be assigned to equipment. The first address identifies the network itself and the last is reserved as the broadcast address. Larger prefixes mean smaller blocks: /25 holds 128 addresses, /26 holds 64, and /30 holds 4 with only 2 usable.
Enter an address and prefix and this tool reports the network address, subnet mask, wildcard mask, broadcast address, first and last host, total addresses, and usable host count. Supplying an address from the middle of a range still resolves the network it belongs to.
When to use it
Use it to confirm the range for a firewall or security group rule, to divide a VPC into subnets, to determine which block an address belongs to, to plan a DHCP pool, or to check whether routing table entries overlap.
Input and output examples
192.168.1.130/24
network 192.168.1.0 / broadcast 192.168.1.255 / 254 usable
An address from the middle of the range still resolves its network.
10.0.0.0/8
mask 255.0.0.0 / 16,777,214 usable
The largest of the private ranges.
172.16.5.4/30
2 usable hosts
The size normally used for point-to-point router links.
Notes and limitations
This tool covers IPv4 only; IPv6 uses a different addressing scheme and needs separate calculation. The /31 and /32 prefixes are exceptions to the usual rules: /32 identifies exactly one host, and /31 is defined for router-to-router links where both addresses are usable and there is no broadcast address. Cloud providers also reserve addresses inside each subnet for their own use, with AWS taking five per subnet, so real availability is lower than the arithmetic suggests. Check the provider documentation when planning ranges.
Frequently asked questions
Why are two addresses unusable?
The first identifies the network itself and the last is the broadcast address, so neither can be assigned to a host.
Which ranges are private?
10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16. For the second, only 172.16 through 172.31 are private; 172.32 is public.
Why does my cloud subnet have fewer addresses?
Providers reserve several addresses per subnet for internal use. AWS, for example, takes five.