IP Subnet Calculator

Enter an IPv4 or IPv6 address with a CIDR prefix (e.g. 192.168.1.0/24 or 2001:db8::/48) to compute the network, broadcast, mask, host range and usable host count.

How subnetting works

A subnet mask splits an IP address into a network portion and a host portion. The CIDR suffix (for example /24) is the number of leading bits reserved for the network. The remaining bits address individual hosts, so a /24 network holds 256 addresses — 254 usable hosts once the network and broadcast addresses are set aside.

This calculator supports both IPv4 and IPv6, handles special cases like /31 point-to-point links (RFC 3021) and /32 host routes, and classifies the address as private, public, loopback, link-local or reserved.