IP Subnet Calculator (CIDR)
Calculate subnet details from an IP/CIDR.
Tip: /24 = 256 addresses (254 usable). /16 = 65,536 addresses.
Did this tool help?
About this digital tool
The IP subnet calculator (CIDR) extracts all the details of a network from an IPv4 address and a CIDR prefix. Enter the address, e.g. 192.168.1.0, and the prefix, e.g. 24, and get the subnet mask, the network address, the broadcast address, the first and last host and the number of usable hosts.
The mask comes from the CIDR prefix (24 means 24 one-bits). The network address is the IP ANDed with the mask, the broadcast address is the same with all the host bits set to one, and usable hosts are 2^(32 − prefix) − 2. The calculation happens in your browser, without sending the address anywhere. It is useful for networking students, system administrators and anyone configuring a router or a VLAN.
How to use
- Enter the IPv4 address, e.g. 192.168.1.0.
- Set the CIDR prefix from 0 to 32.
- Read the number of usable hosts and the subnet mask.
- See the network address, the broadcast address, the first and last host.
Frequently asked questions
What does the subnet mask show?
The mask splits the IP address into two parts: the network identifier and the host identifier. E.g. /24 (255.255.255.0) allows 254 hosts in the subnet.
What do the subnet mask and the CIDR prefix show?
Both show which part of the address is network and which is host. /24 is the same as the mask 255.255.255.0, so the first 24 bits are the network.
How many usable hosts does a /24 network have?
254. The network has 256 addresses, but one is the network address and one is the broadcast address, so 254 are usable. The formula is 2^(32 − prefix) − 2.
What happens with the /31 and /32 prefixes?
They are special cases: /31 is used for point-to-point links with two addresses, while /32 is a single address. The tool handles these cases without subtracting the two addresses.