IP Subnet Calculator

IPv4 subnet size and usable hosts from a CIDR prefix.

IP Subnet Calculator helps you iPv4 subnet size and usable hosts from a CIDR prefix. Enter cidr prefix length, review the breakdown, and use the guidance below to understand what the number means — and what it does not. What the IP Subnet calculator does IP Subnet Calculator is built for everyday questions — shopping, home, travel, hobbies, and tech. IPv4 subnet size and usable hosts from a CIDR prefix. You enter cidr prefix length, then Simple Calculators computes the result instantly. Defaults are chosen to be easy to read — change any field to match your situation. How the math works Enter the CIDR prefix length — the number after the slash, such as 24 in 192.168.1.0/24. An IPv4 address has 32 bits; the prefix is how many of them name the network, and the rest number the devices. Total addresses = 2 to the power of (32 − prefix), and usable hosts = total − 2, because the first address names the network and the last is the broadcast address. /31 and /32 are special cases with 2 and 1 usable addresses. The formula: Total addresses = 2^(32 − prefix); usable hosts = total − 2. The two reserved addresses are the network address and the broadcast address.