Subnet Calculator
Enter IP/CIDR, or an IP and a subnet mask. Everything is calculated in your browser and does not count toward your daily lookups.
How we check
In CIDR notation, the number after “/” is how many bits belong to the network. /24 means the first 24 bits are the network and the last 8 bits are hosts, so the range has 256 addresses.
In IPv4 the first address (network) and the last address (broadcast) cannot be given to a device, so usable hosts are usually “total − 2”. /31 (a link between two devices) and /32 (a single address) are exceptions.
10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private ranges. They are used inside homes and offices and are not reachable from the internet.
FAQ
How do I convert a subnet mask to CIDR?
Write the mask in binary and count the 1s. 255.255.255.0 has 24 ones, so it is /24. Enter either one here and you will see both.
What is a wildcard mask?
It is the subnet mask with 0s and 1s swapped. Routers and firewalls use it in ACL and OSPF settings. The wildcard for /24 is 0.0.0.255.
Why does IPv6 have so many hosts?
IPv6 addresses are 128 bits long, so a single /64, the usual size for one network, has about 18 quintillion addresses. IPv6 has no broadcast address.