IPv4 Subnet Calculator

Calculate detailed IPv4 subnet information including network address, broadcast address, usable host range, subnet mask, wildcard mask, and classful address classification.

CIDR Input

Understanding IPv4 Subnet Calculations

An IPv4 address is a 32-bit number typically written in dotted decimal notation as four octets separated by periods (e.g., 192.168.1.0). The subnet mask determines which portion of the address represents the network and which portion represents the host. In CIDR (Classless Inter-Domain Routing) notation, this is expressed as a prefix length following the IP address, such as 192.168.1.0/24, where /24 indicates that the first 24 bits are the network prefix.

Classful addressing divides the IPv4 address space into five classes: Class A (0.0.0.0–127.255.255.255, /8 default mask) for large networks with up to 16 million hosts; Class B (128.0.0.0–191.255.255.255, /16 default mask) for medium-sized networks with up to 65,534 hosts; and Class C (192.0.0.0–223.255.255.255, /24 default mask) for small networks with up to 254 hosts. Classes D and E are reserved for multicast and experimental use respectively.

Each subnet calculation reveals critical information for network engineers: the network address (the first address identifying the subnet itself), the broadcast address (the last address used for sending traffic to all hosts on the subnet), the first and last usable host addresses, the total number of addresses, and the number of usable hosts (total minus network and broadcast addresses for subnets larger than /31). For point-to-point links, /31 subnets provide 2 usable addresses with no separate network or broadcast, while /32 subnets represent a single host.

Understanding binary representation is fundamental to subnetting. Each octet of an IPv4 address represents 8 bits, and the subnet mask is a sequence of contiguous 1-bits followed by 0-bits. The bitwise AND of the IP address and the subnet mask yields the network address, while the bitwise OR of the network address with the inverted mask yields the broadcast address. Our calculator displays both binary representations to help you visualise this relationship. Whether you are designing a new network, auditing an existing allocation, or studying for a certification exam, this calculator provides the foundational information you need.