DEVELOPER TOOL

IP Subnet Calculator

Calculate network address, broadcast, and usable host range from a CIDR block.

About this tool

Enter an IPv4 address and a CIDR prefix length (like /24) to calculate the subnet mask, network and broadcast addresses, usable host range, and total number of usable hosts — useful for network planning, configuring routers and firewalls, or studying for networking certifications.

Frequently asked questions

What does the CIDR prefix mean?
It's the number of leading bits in the 32-bit address used for the network portion — a shorthand for the subnet mask. A /24 means the first 24 bits are the network, leaving 8 bits (256 addresses) for hosts.
Why do /31 and /32 behave differently?
A /32 is a single host address with no network/broadcast distinction. A /31 (RFC 3021) is a special case used for point-to-point links, treating both addresses in the pair as usable rather than reserving one for network and one for broadcast.
What's the difference between network and broadcast address?
The network address (all host bits zero) identifies the subnet itself and isn't assignable to a device. The broadcast address (all host bits one) is used to send data to every device on the subnet at once — neither is normally usable as a regular host address.