Enter an IPv4 address with a CIDR prefix (for example 192.168.1.10/24) to get the network address, broadcast address, usable host range, subnet mask, wildcard mask and more. Everything is calculated in your browser.
How to use the subnet calculator
- Type an IPv4 address, for example
10.20.30.40, or an address with a prefix such as172.16.5.9/20. - Choose the subnet mask or CIDR prefix from the list (if you didn't type one).
- Click Calculate to see the network address, broadcast address, usable host range and masks.
- Use Split this network to divide it into smaller subnets, for example a /24 into four /26 networks.
What is a subnet?
A subnet is a smaller network inside a bigger one. The subnet mask (like 255.255.255.0) or CIDR prefix (like /24) says how many bits of the IP address belong to the network, and how many are left for hosts. A /24 leaves 8 bits for hosts, which gives 256 addresses: one network address, one broadcast address and 254 usable hosts.
Subnetting helps IT teams separate departments, Wi-Fi and servers, reduce broadcast traffic and apply security rules between networks.
CIDR cheat sheet
| 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 |
| /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 (point-to-point links) |
| /32 | 255.255.255.255 | 1 | 1 (single host) |
Private IP address ranges
10.0.0.0/8: 10.0.0.0 to 10.255.255.255172.16.0.0/12: 172.16.0.0 to 172.31.255.255192.168.0.0/16: 192.168.0.0 to 192.168.255.255
Addresses starting with 169.254 are link-local (APIPA). A PC gets one when it can't reach a DHCP server.
FAQ
How many usable hosts are in a /24?
254. A /24 has 256 addresses, minus the network address and the broadcast address.
What is a wildcard mask?
The inverse of the subnet mask. For 255.255.255.0 it is 0.0.0.255. Cisco ACLs and OSPF use wildcard masks.
Why does a /31 have two usable hosts?
RFC 3021 allows /31 networks on point-to-point links, where no network or broadcast address is needed, so both addresses can be used.
Does this tool support IPv6?
Not yet. This calculator is for IPv4.
Preparing for an IT support or networking interview? Read 60 desktop support engineer interview questions and try our free networking skill test. More tools: all free tools.
0 Comments