IPv4 Subnet Calculator (CIDR, Mask, Range)
Type an IPv4 address with CIDR (192.168.1.0/24) and get the network address, broadcast address, usable host range, host count, and the corresponding subnet mask. Reverse: enter a dotted mask (255.255.255.0) and get the CIDR.
How to use the IPv4 Subnet Calculator (CIDR, Mask, Range)
Enter an IPv4 address with a CIDR suffix such as 192.168.1.50/24. You get the network and broadcast addresses, the usable host range, the host count, and the dotted subnet mask. Enter a dotted mask instead to get the matching CIDR back.
Working out a subnet from IP and prefix
A subnet mask or CIDR prefix splits an IPv4 address into a network part and a host part. From that split everything else follows: the network address has all host bits set to zero, the broadcast address has them all set to one, the usable host count is two to the power of the host bits minus two, and the dotted mask is just the prefix written out. Doing this arithmetic in binary by hand is slow and easy to get wrong.
Enter an address with its prefix and this returns the network and broadcast addresses, the usable host range, the host count, and the mask — or give it a dotted mask to get the CIDR. To convert a whole block to its first and last IP or summarise a range, use the CIDR to range converter; to validate or classify a single address, the IP address tools.
Common use cases
- Subnet planning — size a network and see its host capacity.
- Firewall and ACL rules — confirm the network and broadcast boundaries.
- Host counting — check how many usable addresses a prefix gives.
- Mask conversion — translate a dotted mask to and from CIDR.
- Troubleshooting — verify an address actually falls in the intended subnet.