CIDR subnet calculator
Enter an address with a prefix length, a subnet mask or a wildcard mask and get the network, the broadcast address, the usable range and both masks. Works for IPv4 and IPv6, and splits a network into smaller subnets.
Is an address in this subnet?
Split into smaller subnets
| Subnet | First address | Last address |
|---|
IPv4 prefix lengths and masks
| Prefix | Subnet mask | Wildcard mask | 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 |
/32 | 255.255.255.255 | 0.0.0.0 | 1 | 1 |
In an ordinary subnet the first address names the network and the last is the broadcast address, so two addresses are not usable for hosts. A /31 is the exception used on point-to-point links, where both addresses are hosts (RFC 3021). A /32 is a single host.
Wildcard masks
A wildcard mask is the subnet mask turned over: every 1 bit becomes 0 and every 0 becomes 1, so each part is 255 less the part of the subnet mask. 255.255.252.0 gives 0.0.3.255. Router access lists, such as Cisco's, take a wildcard mask after an address: a 0 bit must match and a 1 bit can be anything. So 10.1.1.0 0.0.0.255 matches 10.1.1.0 to 10.1.1.255, 0.0.0.0 255.255.255.255 matches every address, and 10.1.1.2 0.0.0.0 matches that address alone.
The calculator reads a wildcard mask in place of a subnet mask and says so. To write a list or a range as blocks with wildcard masks, use the IP range to CIDR converter.
Reserved IPv4 ranges
| Range | Use |
|---|---|
10.0.0.0/8 | Private network (RFC 1918) |
172.16.0.0/12 | Private network (RFC 1918) |
192.168.0.0/16 | Private network (RFC 1918) |
100.64.0.0/10 | Shared address space for carrier-grade NAT (RFC 6598) |
127.0.0.0/8 | Loopback |
169.254.0.0/16 | Link-local, the range Windows assigns itself when DHCP fails (APIPA) |
192.0.2.0/24 | Documentation and examples (TEST-NET-1) |
198.51.100.0/24 | Documentation and examples (TEST-NET-2) |
203.0.113.0/24 | Documentation and examples (TEST-NET-3) |
198.18.0.0/15 | Network benchmark testing |
224.0.0.0/4 | Multicast |
240.0.0.0/4 | Reserved |
0.0.0.0/8 | "This network": only valid as a source address |
The IP address type checker has every special-purpose block of IANA's registries, IPv6 included.
More Network tools
-
IP range to CIDR converter
Turn a range such as 10.0.0.5-10.0.0.70 into CIDR blocks, merge a list of blocks, and check whether an address is in it.
-
IP address type checker
See whether an address is private, CGNAT, link-local, loopback, documentation, multicast or public, with its RFC.
-
IPv6 expander, compressor and reverse name
Write an IPv6 address in full or in its shortest form, get its ip6.arpa name, or build one from a MAC address.
-
MAC address format converter
Convert MAC addresses between colons, dashes, Cisco's dotted form and plain hex, and read the multicast and local bits.
-
MTU and MSS calculator
Work out the MTU and TCP MSS inside PPPoE, GRE, VXLAN, WireGuard and IPsec, with ping commands that test them.
-
Port number lookup
Look up a port such as 445 or 5985, or a service name, in IANA's registry, with what Windows and Active Directory use it for.
-
DHCP option encoder and decoder
Build or read the hex of option 121 and 249 static routes, option 119 search lists and option 43 for Cisco and UniFi.
-
NPS reason code lookup
Read why Network Policy Server denied a request: events 6273 and 6274, and reason codes such as 16, 48 and 65.
-
Wi-Fi reason and status codes
Look up 802.11 deauthentication and disassociation reason codes and association status codes.
-
DSCP and ToS converter
Convert DSCP, ToS and CoS values, with the Wi-Fi priorities of RFC 8325 and the Teams QoS markings.