Subnet calculator

Enter an IPv4 address with a CIDR prefix (like 10.20.30.40/22) or a netmask (10.20.30.40 255.255.252.0).

Runs in your browser

Split into smaller subnets

How subnetting works

The prefix length says how many leading bits identify the network. A /24 keeps 24 network bits and leaves 8 bits, or 256 addresses, for hosts. The first address is the network address and the last is the broadcast address, so a normal subnet has total − 2 usable hosts.