CIDR Calculator

Format: address/prefix. Prefix 0-32. Examples: 10.0.0.0/8, 172.16.0.0/12, 192.168.1.0/24, 10.0.0.0/31.

CIDR block
192.168.1.0/24
Network address
192.168.1.0
Broadcast address
192.168.1.255
First usable host
192.168.1.1
Last usable host
192.168.1.254
Subnet mask
255.255.255.0
Wildcard mask
0.0.0.255
Total IPs
256
Usable IPs
254
IPv4 class
C
Host bits / Prefix
8 host / /24
Subnet mask (binary)
11111111.11111111.11111111.00000000
IP address (binary)
11000000.10101000.00000001.00000000

How CIDR math works

CIDR (Classless Inter-Domain Routing) replaces the old A/B/C class system with a prefix length — the number of leading 1-bits in the subnet mask. A /24 means the top 24 bits identify the network and the bottom 8 bits identify the host, giving 28 = 256 addresses per block. Two of those (network and broadcast) aren't usable for hosts, so a /24 fits 254 hosts. A /16 fits 65,534. A /30 fits 2.

The two edge cases worth knowing: /31 blocks (RFC 3021) are used for point-to-point links and have no network or broadcast address — both addresses are usable, total = usable = 2. A /32 represents a single host; total = usable = 1. The calculator handles both.

PrefixSubnet maskTotal IPsUsable
/8255.0.0.016,777,21616,777,214
/16255.255.0.065,53665,534
/24255.255.255.0256254
/25255.255.255.128128126
/26255.255.255.1926462
/27255.255.255.2243230
/28255.255.255.2401614
/29255.255.255.24886
/30255.255.255.25242
/31255.255.255.25422
/32255.255.255.25511