IP subnet calculator

Enter an IPv4 address with a prefix (192.168.1.10/24) or a netmask to get the network, broadcast, host range and mask.

How it works

An IPv4 address is 32 bits. The prefix length says how many leading bits are the network:

network = address AND maskbroadcast = network OR NOT maskhosts = 2^(32 − prefix) − 2

Worked example

  1. 192.168.1.10/24 → mask 255.255.255.0
  2. network 192.168.1.0, broadcast 192.168.1.255
  3. hosts 192.168.1.1 – 192.168.1.254 (254)

Frequently asked questions

Why are two addresses not usable?

In a normal subnet the first address names the network and the last one is the broadcast address, so a /24 has 256 addresses and 254 usable hosts. A /31 (point-to-point links) and a /32 (a single host) are exceptions.

What is a wildcard mask?

The netmask with every bit flipped (0.0.0.255 for a /24). Cisco access lists and some firewalls use it.

Is the address private?

The calculator tells you: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 are private ranges, 100.64.0.0/10 is carrier-grade NAT, 127.0.0.0/8 is loopback.