Enter an IP with CIDR notation or subnet mask to calculate the network address, broadcast, host range and wildcard mask — or scroll down for the full CIDR reference table.
CIDR (Classless Inter-Domain Routing) notation is a compact way to represent an IP address and its subnet mask. It is written as an IP address followed by a forward slash and a prefix length, for example 192.168.1.0/24. This tool converts between CIDR notation and subnet masks and calculates the network address, broadcast address, usable host range, wildcard mask and total addresses for any IPv4 network. The full CIDR-to-subnet-mask reference table below covers every prefix from /8 to /32.
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.
The full mapping between CIDR notation and subnet masks for IPv4, from /8 to /32. Use this to look up the mask, wildcard mask and host count for any CIDR prefix without running the calculator. For a deeper walkthrough, see our guide: CIDR notation explained.
| CIDR | Subnet mask | Wildcard mask | Total addresses | Usable hosts |
|---|---|---|---|---|
/8 | 255.0.0.0 | 0.255.255.255 | 16,777,216 | 16,777,214 |
/9 | 255.128.0.0 | 0.127.255.255 | 8,388,608 | 8,388,606 |
/10 | 255.192.0.0 | 0.63.255.255 | 4,194,304 | 4,194,302 |
/11 | 255.224.0.0 | 0.31.255.255 | 2,097,152 | 2,097,150 |
/12 | 255.240.0.0 | 0.15.255.255 | 1,048,576 | 1,048,574 |
/13 | 255.248.0.0 | 0.7.255.255 | 524,288 | 524,286 |
/14 | 255.252.0.0 | 0.3.255.255 | 262,144 | 262,142 |
/15 | 255.254.0.0 | 0.1.255.255 | 131,072 | 131,070 |
/16 | 255.255.0.0 | 0.0.255.255 | 65,536 | 65,534 |
/17 | 255.255.128.0 | 0.0.127.255 | 32,768 | 32,766 |
/18 | 255.255.192.0 | 0.0.63.255 | 16,384 | 16,382 |
/19 | 255.255.224.0 | 0.0.31.255 | 8,192 | 8,190 |
/20 | 255.255.240.0 | 0.0.15.255 | 4,096 | 4,094 |
/21 | 255.255.248.0 | 0.0.7.255 | 2,048 | 2,046 |
/22 | 255.255.252.0 | 0.0.3.255 | 1,024 | 1,022 |
/23 | 255.255.254.0 | 0.0.1.255 | 512 | 510 |
/24 | 255.255.255.0 | 0.0.0.255 | 256 | 254 |
/25 | 255.255.255.128 | 0.0.0.127 | 128 | 126 |
/26 | 255.255.255.192 | 0.0.0.63 | 64 | 62 |
/27 | 255.255.255.224 | 0.0.0.31 | 32 | 30 |
/28 | 255.255.255.240 | 0.0.0.15 | 16 | 14 |
/29 | 255.255.255.248 | 0.0.0.7 | 8 | 6 |
/30 | 255.255.255.252 | 0.0.0.3 | 4 | 2 |
/31 | 255.255.255.254 | 0.0.0.1 | 2 | 2 (point-to-point, RFC 3021) |
/32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 (host route) |
Usable hosts is calculated as 2(32−prefix) − 2, excluding the network and broadcast addresses. The /31 and /32 rows have special uses in modern networking.
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.