di>_
DigInterface
Free DNS, Email & Developer Tools
🧩 New! DigInterface Tools is now available as a browser extension — DNS, Headers, SSL, Blacklist, WHOIS, SPF & Propagation right from your toolbar.
🖧

CIDR Calculator & Subnet Mask Converter

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.

Quick: 192.168.0.0/24 10.0.0.0/8 172.16.0.0/12 192.168.1.0/28 10.0.0.0/16 192.168.100.0/26

About This Tool

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 to Subnet Mask Reference Table

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.

CIDRSubnet maskWildcard maskTotal addressesUsable hosts
/8255.0.0.00.255.255.25516,777,21616,777,214
/9255.128.0.00.127.255.2558,388,6088,388,606
/10255.192.0.00.63.255.2554,194,3044,194,302
/11255.224.0.00.31.255.2552,097,1522,097,150
/12255.240.0.00.15.255.2551,048,5761,048,574
/13255.248.0.00.7.255.255524,288524,286
/14255.252.0.00.3.255.255262,144262,142
/15255.254.0.00.1.255.255131,072131,070
/16255.255.0.00.0.255.25565,53665,534
/17255.255.128.00.0.127.25532,76832,766
/18255.255.192.00.0.63.25516,38416,382
/19255.255.224.00.0.31.2558,1928,190
/20255.255.240.00.0.15.2554,0964,094
/21255.255.248.00.0.7.2552,0482,046
/22255.255.252.00.0.3.2551,0241,022
/23255.255.254.00.0.1.255512510
/24255.255.255.00.0.0.255256254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122 (point-to-point, RFC 3021)
/32255.255.255.2550.0.0.011 (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.

Frequently Asked Questions

What is CIDR notation?

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.

How do I calculate a subnet mask from CIDR?

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.

What is the difference between /24 and /16?

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.

What is the broadcast 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.

How many usable hosts does a subnet have?

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.

What is a wildcard mask?

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.