Calculate subnet information from an IP address with CIDR notation. Supports IPv4 and IPv6.
CIDR (Classless Inter-Domain Routing) is a method for allocating IP addresses and routing Internet Protocol packets. Introduced in 1993, CIDR replaced the previous classful network addressing architecture. CIDR notation appends a suffix indicating the number of bits in the network prefix (e.g., 192.168.1.0/24), allowing flexible subnetting beyond the traditional Class A, B, C boundaries.
CIDR uses a prefix length to define the boundary between the network and host portions of an IP address. The prefix length (e.g., /24) indicates how many bits are used for the network address. The remaining bits are available for host addresses. A /24 prefix means 24 bits for the network (256 total addresses, 254 usable hosts), while /16 provides 65,536 total addresses.
192.168.1.0/24
254 usable hosts, mask 255.255.255.0
10.0.0.0/8
16,777,214 usable hosts, mask 255.0.0.0
172.16.0.0/12
1,048,574 usable hosts, mask 255.240.0.0
A /24 network has 256 total addresses (254 usable hosts) with subnet mask 255.255.255.0. A /25 network splits this in half: 128 total addresses (126 usable hosts) with subnet mask 255.255.255.128.
The first address in a subnet is the network address and the last is the broadcast address. These cannot be assigned to hosts, so they are subtracted from the total to get usable host count. Exception: /31 and /32 subnets have special rules (RFC 3021).
RFC 1918 defines three private ranges: 10.0.0.0/8 (Class A), 172.16.0.0/12 (Class B), and 192.168.0.0/16 (Class C). These addresses are not routable on the public internet and are used for internal networks.