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. When to use IP Subnet Calculator IP Subnet Calculator is for everyday questions — shopping, home, travel, hobbies, and tech. IPv4 subnet size and usable hosts from a CIDR prefix. See how many devices fit on a network of a given size, plus its subnet mask. Useful when setting up a router, office network or firewall rule. How IP Subnet is calculated 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. Hosts from prefix: Total addresses = 2^(32 − prefix); usable hosts = total − 2. The two reserved addresses are the network address and the broadcast address.