Enter an IP address with CIDR notation or subnet mask to calculate network details, host ranges and subnet breakdowns.
The Subnet & CIDR Calculator accepts any IPv4 address in CIDR notation (e.g. 192.168.1.0/24) or with a dotted subnet mask (e.g. 10.0.0.0/255.255.255.0) and calculates the network address, broadcast address, first and last usable host addresses, wildcard mask, total addresses, usable host count and network class. The binary visualiser shows which bits are network bits (blue) and which are host bits (green). The subnet breakdown table splits the network into smaller subnets at a prefix length of your choice, up to the first 256 subnets. All calculations run entirely in your browser.
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its associated network mask. It is written as an IP address followed by a forward slash and a prefix length, for example 192.168.1.0/24. The prefix length tells you how many bits are used for the network portion of the address.
Enter your IP address with CIDR prefix (e.g. 10.0.0.0/22) in the input above and click Calculate. The tool will instantly show you the subnet mask, network address, broadcast address and usable host range. You can also enter the subnet mask directly (e.g. 255.255.252.0) and the prefix length will be calculated for you.
A /24 network (subnet mask 255.255.255.0) provides 254 usable host addresses. A /16 network (subnet mask 255.255.0.0) provides 65,534 usable host addresses. The smaller the prefix number, the larger the network and the more hosts it can accommodate. A /32 represents a single host address.
The broadcast address is the last address in a subnet and is used to send packets to all hosts on that network simultaneously. It cannot be assigned to an individual device. For example, in the network 192.168.1.0/24, the broadcast address is 192.168.1.255.
The number of usable hosts is 2(32−prefix) − 2. The two addresses subtracted are the network address and the broadcast address, which cannot be assigned to hosts. For a /24 that is 28 − 2 = 254 usable hosts. For a /22 it is 210 − 2 = 1,022 usable hosts.
A wildcard mask is the inverse of a subnet mask and is commonly used in Cisco ACLs (Access Control Lists) and OSPF routing configurations. Where a subnet mask uses 1s to represent network bits, a wildcard mask uses 0s. For a subnet mask of 255.255.255.0, the wildcard mask is 0.0.0.255.