Subnet Calculator

Work out network address, broadcast address, usable host range and subnet mask from any IP and prefix.

Understanding the subnet calculation

CIDR notation writes a network as an address followed by a prefix length โ€” the number of leading bits that identify the network rather than the host. A /24 fixes the first 24 bits, leaving 8 bits and therefore 254 usable addresses.

The network address and broadcast address are reserved at each end of the range, which is why usable hosts are always two fewer than the total. A /31 is the exception, used for point-to-point links.

A worked example

As an example, with a IP address of 192.168.1.10, CIDR prefix of 24, the calculator returns a network of 192.168.1.0/24. Underneath, Netmask comes out at 255.255.255.0 and Broadcast at 192.168.1.255. Change any field and every figure updates as you type.

Step by step

  1. Enter an IP address from the network.
  2. Enter the prefix length or choose a subnet mask.
  3. Read the network, broadcast and usable host range.

Formula reference

usable hosts = 2^(32 โˆ’ prefix) โˆ’ 2 network address = IP AND mask ยท broadcast = network OR inverted mask

Common questions

What does /24 mean?
That the first 24 bits are the network portion, equivalent to a 255.255.255.0 mask, giving 254 usable host addresses.
Why are two addresses unusable?
The lowest is the network identifier and the highest is the broadcast address, so neither can be assigned to a host.
How do I split a network?
Increase the prefix length. Each additional bit halves the block size and doubles the number of subnets.