IP Subnet Calculator

Calculate IPv4 and IPv6 subnet ranges, masks and hosts

Enter an IPv4 or IPv6 address with a prefix (CIDR) or subnet mask to get the network and broadcast addresses, usable host range, masks and address count - and split a network into smaller subnets.
Try an example:

Output will appear here...

About IP Subnet Calculator

How it works

  1. The address and prefix length (the "/24" part) are read. For IPv4 you can also give a subnet mask, like 10.0.0.1 255.255.240.0.
  2. The prefix says how many leading bits identify the network. The remaining bits number the hosts inside it.
  3. From that we compute the network address, broadcast address, first and last usable hosts, masks and the number of addresses.
  4. If you enter a larger prefix to split into, the network is divided into equal subnets and each one is listed (up to 256).

What you need

  • An IPv4 address with /prefix (0-32) or a subnet mask, or an IPv6 address with /prefix (0-128).
  • To split, a new prefix larger than the current one - e.g. split a /24 into /26 subnets.

Tips

  • A /24 (255.255.255.0) holds 254 usable hosts; each extra bit halves it: /25 = 126, /26 = 62, /27 = 30.
  • /31 and /32 have no network or broadcast address - they are used for point-to-point links and single hosts.
  • IPv6 LANs normally use /64; providers often hand out a /48 or /56 to split into /64s.

Limitations

  • When splitting into more than 256 subnets, only the first 256 are listed (the total count is still shown).

Runs in your browser. Nothing you enter is uploaded - all processing happens on your device.

Frequently asked questions

What does /24 mean?+

It is CIDR notation: the first 24 bits of the address identify the network, leaving 8 bits (256 addresses) for hosts. It is the same as the subnet mask 255.255.255.0.

Why are there 2 fewer usable hosts than addresses?+

In IPv4, the first address identifies the network and the last is the broadcast address, so neither can be given to a device (except in /31 and /32 networks).

What is a wildcard mask?+

The inverse of the subnet mask (0.0.0.255 for a /24). Cisco access lists and OSPF use it to match address ranges.