Skip to main content

Subnet Calculator

By Dejan Panovski Updated on

Enter an IPv4 network in CIDR notation to see its network and broadcast address, usable host range, masks, and binary split. Then pick a smaller prefix to divide the block into equal subnets.

Network
Broadcast
First host
Last host
Usable hosts
Netmask
Wildcard mask

Network and host bits

Blue bits are the network portion; gray bits are the host portion.

Subnets resulting from the split
SubnetHost rangeBroadcast

How CIDR notation works

CIDR notation writes a network as an address followed by a slash and a prefix length, such as 192.168.1.0/24. The prefix is the number of leading bits that identify the network; the remaining bits identify hosts inside it. A /24 fixes the first 24 bits, leaving 8 bits for hosts, which is why it holds 256 addresses.

The netmask is the same split written as four octets: a /24 is 255.255.255.0. The wildcard mask is its inverse (0.0.0.63 for a /26) and is what access lists and some routing tools expect. The binary view above highlights the boundary so you can see exactly which bits belong to the network and which are free for hosts.

Network, broadcast, and usable hosts

In a normal block the first address is the network address and the last is the broadcast address. Neither is assigned to a host, so a /24 has 256 total addresses but only 254 usable ones. Splitting a network moves that boundary: a /26 carves the block into four subnets of 64 addresses, each with 62 usable hosts.

Two prefixes behave differently, following RFC 3021:

  • A /31 is a point-to-point link. Both addresses are usable and there is no separate network or broadcast address, which is why the calculator reports two usable hosts.
  • A /32 is a single host route. It describes one address with no host range.

Splitting a network

Use the “split this network” panel to divide the current block into equal subnets. Pick a longer prefix and the tool lists each resulting subnet with its host range and broadcast address. This is the common planning task when you carve a larger allocation into per-team or per-service ranges.

The calculator handles IPv4 only. IPv6 subnetting uses the same prefix idea over a 128-bit address space and is out of scope for this version.