Subnet calculator

Type any IPv4 or IPv6 address with its prefix or mask to get the network, broadcast, host range, mask and wildcard. Then learn to do it in your head: the exam gives you no calculator.

How to read the result

For 192.168.10.77/27 the mask is 255.255.255.224, so the subnets go up in blocks of 32: the network is 192.168.10.64, the broadcast 192.168.10.95, the hosts .65 to .94 (30 usable), and the wildcard 0.0.0.31.

Subnetting without a calculator

  1. Find the interesting octet, where the mask is not 255 or 0.
  2. Block size = 256 minus the mask in that octet.
  3. Count up in blocks until you pass the address: that block's start is the network.
  4. Broadcast = next block minus 1. Hosts = 2 to the power of the host bits, minus 2.

Prefix, mask and hosts

PrefixMaskWildcardBlockHosts
/16255.255.0.00.0.255.255165,534
/17255.255.128.00.0.127.25512832,766
/18255.255.192.00.0.63.2556416,382
/19255.255.224.00.0.31.255328,190
/20255.255.240.00.0.15.255164,094
/21255.255.248.00.0.7.25582,046
/22255.255.252.00.0.3.25541,022
/23255.255.254.00.0.1.2552510
/24255.255.255.00.0.0.2551254
/25255.255.255.1280.0.0.127128126
/26255.255.255.1920.0.0.636462
/27255.255.255.2240.0.0.313230
/28255.255.255.2400.0.0.151614
/29255.255.255.2480.0.0.786
/30255.255.255.2520.0.0.342
/31255.255.255.2540.0.0.122
/32255.255.255.2550.0.0.011